Open eugenehuangsg opened 3 months ago
Does this solve your problem?
If any questions remain, please do not hesitate to ask.
Thank you for the insight. The NETWORK_SIMPLEX + priority.straightness is a possible approach. I'm trying to figure out how to programmatically allocate straightness priority to get the desired look and feel. Naively, the edges represent the weight among its sibling edges, but there is a relevance where the priority of other sections of the graph can still influence. Can you help weigh in on this?
If nodes have only connections to the right without skipping a layer and the order of nodes is fix and the order of edges corresponds to the order of nodes, the outgoing edge has to be straight and needs a straightness priority. Everything else does not need one, hence you can just set priority.straightness: 10
or something like this on every node if you can keep the edge and node order as it is.
Since you set crossingMinimization.strategy
to NONE
this is what you have to do anyway to avoid crossings.
My bad, you only need to take care that the edges are ordered as you want them to be. The nodes are ordered by the edges.
Somehow, setting crossMinimization.strategy
to NONE
does not take effect in the JSON format. Can you help me take a look?
You have to change the ELK version to 0.8.X or higher.
Cool, all my issues have been solved. Thank you for the help!
Here is the final solution for those who might need it.
Hi @soerendomroes, is there a property I can set to force the position of the root node on the top left corner?
With straightness priority, the root node can potentially still move with the graph.
No, sadly not.
Hi guys, I'm trying to design a 5 columns layout with the following constraints
Expected outcome
So far, I'm able to get the expected layout when the graph is fully expanded. However, the graph starts to differ from my intended outcome whenever some nodes are collapsed. I suspect it is due to crossingMinimization options but I have no idea how to fix it. I would appreciate any guidance on this.
Current options:
{ 'elk.algorithm': 'layered', 'elk.direction': 'RIGHT', 'elk.spacing.nodeNode': 20, 'elk.spacing.edgeEdge': 10, 'elk.layered.spacing.nodeNodeBetweenLayers': 100, 'elk.layered.crossingMinimization.forceNodeModelOrder': true, 'elk.layered.nodePlacement.favorStraightEdges': true, 'elk.layered.layering.strategy': 'BRANDES_KOEPF', 'elk.layered.layered.nodePlacement.bk.fixedAlignment': 'LEFTUP' }
Unintended outcome when nodes are hidden.