dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.84k stars 587 forks source link

Edges are crossed but there are visible ways to avoid it #318

Open NtsDK opened 6 years ago

NtsDK commented 6 years ago

I tried to layout my data with dagre-d3. There are three issues for me on this picture:

  1. Edges are crossed but there are visible ways to avoid it. Can you advice some option to avoid it?
  2. Some edges are behind nodes. Can you advice some option to avoid it too? Is it possible to draw edge in steps manner?
  3. Nodes 0, 7, 8, 11 on the same line with 13. Is it possible to move 0, 7, 8, 11 to one line lower?

layout

koosvanderkolk commented 6 years ago

Edges are crossed but there are visible ways to avoid it. Can you advice some option to avoid it?

I am facing the same problem with dagre. Afaik there is no way to avoid it :-(

Some edges are behind nodes. Can you advice some option to avoid it too? Is it possible to draw edge in steps manner?

I am not using d3, but jsplumb. I then use a 'manhattan'-style router (see https://jsplumbtoolkit.com/demos/wrapped/flowchart/index.html) to draw the worfklow, which at least avoids most collisions between edges and figures

Nodes 0, 7, 8, 11 on the same line with 13. Is it possible to move 0, 7, 8, 11 to one line lower?

I think this is default behavior of dagre, it cannot know you do not want this. My recommendation is to do it manually (=using your own custom code), after dagre did its calcuation.