dagre icon indicating copy to clipboard operation
dagre copied to clipboard

Dagre not able to draw my graph without 2 edges crossing

Open trevorweng opened this issue 1 year ago • 2 comments

https://codesandbox.io/s/pedantic-rui-jr492w?file=/nodes-edges.js

Screen Shot 2023-08-23 at 10 58 56 PM

In this example here, see how node F->I crosses C->J, even though it looks like it can be avoided if J and I were swapped

trevorweng avatar Aug 24 '23 05:08 trevorweng

any update on this?

TheOsadxen avatar Sep 27 '23 20:09 TheOsadxen

I am also seeking solutions to such problems.

The most effective method currently seems to be to enumerate the different permutations at each level and calculate the total number of line intersections after different permutations to find the situation with the least number of intersections.

pjxxcc avatar Oct 13 '23 08:10 pjxxcc