Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dagre not able to draw my graph without 2 edges crossing #357

Open
trevorweng opened this issue Aug 24, 2023 · 3 comments
Open

Dagre not able to draw my graph without 2 edges crossing #357

trevorweng opened this issue Aug 24, 2023 · 3 comments

Comments

@trevorweng
Copy link

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

@TheOsadxen
Copy link

any update on this?

@pjxxcc
Copy link

pjxxcc commented Oct 13, 2023

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.

@bsvetlik
Copy link

Hi pjxxcc,

I have the same problem in the latest dagre version 1.1.4:
algorithm_dagre_crossing_edges
Crossing nodes can be manually resolved by swapping nodes:
algorithm_dagre_crossing_edges_resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants