dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.83k stars 588 forks source link

Controlling nodes positions #356

Closed pmario26 closed 4 years ago

pmario26 commented 5 years ago

Hi, i'm working on a project with dagre-d3 and would like to know if in the current lib version is there any way i can control the position of some nodes, to keep then not only together (like clustering do) but also mostly alligned together. For example,in the picture below the selected nodes are grouped together inside the cluster, but they are still scattered. graph_before

What i would like to do is to draw these nodes in a single line, alligned together instead of scattered,like this: graph

Is there anyway i can achieve that with the current version of the lib ? If not, how could i go about changing the lib to achieve that ?

pmario26 commented 5 years ago

I have reseached past issues and found some old threads that are related to my issue. https://github.com/dagrejs/dagre/issues/201 https://github.com/dagrejs/dagre-d3/issues/64 Are these fixes still possible in the current version of dagre ? I think that being able to control the ranks of nodes would also help, but this feature appears to have been deprecated.

mmazanec22 commented 5 years ago

@pmario26 did you end up figuring this out? I'm in a similar situation-- need to stagger nodes at same level into separate rows so the text inside is readable on mobile