dagrejs / dagre-d3

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

How to improve crossing edges? #416

Open ppazos opened 3 years ago

ppazos commented 3 years ago

When a diagram gets complex, there are a lot of crossing edges, and some can clearly be avoided.

status_details

Where is the algorithm that controls that? Is there a way to adjust the time or complexity at which it stops trying to improve the crossing to increase that a little bit to see if things improve for my poor diagram?

Thanks

ppazos commented 3 years ago

I found that the rendering order affects how the edges are generated by reading this answer https://stackoverflow.com/a/36113166/1644320

What I did is manually changed the order in which the edges are defined and the diagram improved a little bit. Maybe if I test the algorithm in the answer above I can get better results since more combinations will be tested.