d3-mitch-tree icon indicating copy to clipboard operation
d3-mitch-tree copied to clipboard

Custom Path for Links

Open phantomtnt opened this issue 5 years ago • 2 comments

Hello is there any way to apply this custom path to links, and make it work with the transition in the tree layout?

treePlugin.getPanningContainer().selectAll('.link').attr("d", function(d){
  return "M" + d.parent.y + "," + (d.parent.x-45)
    + "H" + (d.parent.y + (d.y-d.parent.y)/1.4)
    + "V" + (d.x-45)
    + "H" + d.y;
});

phantomtnt avatar May 15 '19 17:05 phantomtnt

I am interrested in this subject, too, if you have any tips for me, I would be really thankfull.

altmandian avatar Feb 22 '22 10:02 altmandian

I am interrested in this subject, too, if you have any tips for me, I would be really thankfull.

I found a way to do it, you have to modify the source code where the paths are generated (i don't remember where is it) with your custom one and compile the plugin for your usage.

phantomtnt avatar Feb 25 '22 13:02 phantomtnt