react-diagrams icon indicating copy to clipboard operation
react-diagrams copied to clipboard

Dagre node ranking

Open xiaopow opened this issue 4 years ago • 6 comments

I am able to use dagre to auto position nodes, however I am not sure how to get the ranking of the nodes correctly. I would like "Path B" node to be at the same rank as "Path A".

Screenshot 2020-02-28 at 10 12 10 AM

xiaopow avatar Feb 28 '20 02:02 xiaopow

@renato-bohler @pierre-moire , would you have any idea how to fix this? Thank you.

xiaopow avatar Feb 28 '20 02:02 xiaopow

No idea, I've never used dagre :confused:

renato-bohler avatar Feb 28 '20 10:02 renato-bohler

Same, sorry. I use custom layout algorithms

pierre-moire avatar Feb 29 '20 10:02 pierre-moire

@pierre-moire, oh cool, how do you go about building that?

xiaopow avatar Feb 29 '20 12:02 xiaopow

All elements in my chart have a pre-defined place based on their level and index so each time an event is triggered I re-run a function that lists node and for each one moves it with animation to its final place. Nothing really comparable to dagre or another overlap avoiding algorithm

pierre-moire avatar Feb 29 '20 21:02 pierre-moire

I am able to use dagre to auto position nodes, however I am not sure how to get the ranking of the nodes correctly. I would like "Path B" node to be at the same rank as "Path A".

Screenshot 2020-02-28 at 10 12 10 AM

HI!!

Have you had any updates on this issue?

brunaschneiders avatar Jun 02 '21 15:06 brunaschneiders