dagre icon indicating copy to clipboard operation
dagre copied to clipboard

Swimlane support

Open ipavlic opened this issue 5 years ago • 0 comments

A nice feature would be an ability to lay out groups of nodes in swimlanes (columns or rows, depending on the orientation), commonly used in BPMN tools.

  • ~nodes should have an attribute identifying the lane they belong to, either as a direct attribute, or as a new parent-child structure on the graph which would allow nested lanes~

Parent-child relationships are already supported and used with clusters.

Assuming 4 main passes of the algorithm rank, order, position and route and swimlanes parallel to main flow, the following should be implemented:

  • order phase should constrain a set of possible orderings to those that correspond to lane order. For example, if lane A contains nodes 1 and 2 and lane B contains node 3 in the same rank, then the only possible orderings are (1, 2, 3) and (2, 1, 3). (1, 3, 2), (2, 3, 1), (3, 1, 2) (3, 2, 1) are not allowed because node 3 belongs to lane B which comes after lane A

ipavlic avatar Sep 26 '18 12:09 ipavlic