dagrejs / dagre

Directed graph layout for JavaScript
MIT License
4.69k stars 602 forks source link

Control over node layout; relative node positioning #191

Open karlis-dreizis opened 8 years ago

karlis-dreizis commented 8 years ago

Dagre so far is pretty awesome, but doesn't quite entirely fill my current requirements. I need to layout the nodes top-down restricted to a vertical line/column and have auxiliary nodes on the same y height and vertically aligned to the middle column. Having the edges converge on a common destination would also be a boon.

What would it take to implement this? Is there anything in place to facilitate this functionality or what would be the best place to start?

I started working on a python script to do this. And this is as far as i got and then I found Dagre. http://jsfiddle.net/8q4n92jb/

Any pointers are greatly appreciated!

ASCII version in case the link ever goes down

--------------------------------------------------
columns1      |     column2     |     column3
--------------------------------------------------
              |                 |     aux_el1.1
   text       |        el1      |     aux_el1.2
              |                 |     aux_el1.3
              |                 |
              |       el2...    |
gordonwoodhull commented 8 years ago

I'm not sure of your exact requirements, but cola.js comes to mind because this sounds like contraint-based layout (with nodes aligned in X and Y) rather than directed layout.