Open fima-methodic opened 2 weeks ago
mrtree
also "works" for graphs that are not trees, as the one you used. However, it handles all edges that are not part of the primary tree differently and does not consider them for node placement. Hence, this algorithm cannot do what you want it to do.
Maybe the layered
algorithm works for you.
@soerendomroes The layered
algorithm works for me pretty well beside 1 issue that i have with sorting some of the nodes.
Extending your example the child nodes n2 - a
, n3 - b
, n4 - c
being placed like this (from left to right) -> n4 - n2 - n3
.
Is there a way to sort the nodes in a different way (n2 - n3 - n4
)?
Have you tried setting considerModelOrder.strategy to NODES_AND_EDGES?
Thank you very much for your help @soerendomroes it worked :)
Hey, i am using elkjs and i am trying to achieve a result where when a node in the tree has 2 parents (and 2 edges) it will be centered beneath them and not aligned to the left.
Here is a screenshot of the current behavior: link to elklive
I need the bottom node to be aligned to the center - how can i achieve that?
I'll be glad to provide more information if needed