Open rasifix opened 9 years ago
+1. I have the same need as @rasifix .
Would be great if this would be possible... I have the same need as well...
+1. I would like this functionality as well.
Same same
Same here - it would be great to have this feature.
+1, I really need this too. It seems to be the rank system that use a simplified graph (made only with nodes, not clusters), so when it tried to add edge on a cluster it doesn't find it.
I can spent some time to fix this, but I need some help to not spent too much ^^. What is rank ?
+1 Me too
Anyone solved this issue, it will be helpful if you can share the snippet 👍
@cpettitt I can image you are busy and don't have time to work on this, but could you maybe provide a pointer on where the problem could be and how to solve it?
Unfortunately it has been too long since I worked with dagre to be of much help. I relied heavily on two papers for subgraphs, which may be of help:
The implementation for clustering derives extensively from Sander, "Layout of Compound Directed Graphs." It is an excellent paper that details the impact of clustering on all phases of layout and also covers many of the associated problems. Crossing reduction with clustered graphs derives from two papers by Michael Forster, "Applying Crossing Reduction Strategies to Layered Compound Graphs" and "A Fast and Simple Heuristic for Constrained Two-Level Crossing Reduction."
It is possible that I just didn't implement node to subgraph. Another possibility is that there is some bug in the way the edges are handled. IIRC, I collapse all nodes in a subgraph during ranking (this figures out what level each node ends up at), so that would be an area to look at. One of the two papers (Sander, I think?) goes into the logic behind collapsing nodes in the rank phase.
On my side, I have finally used cytoscape.js to handle the display of hierarchical graphs (in case it can help someone).
A workaround is to redirect your edges to the first node in the cluster.
@Tichau problem with cytoscape.js
is it requires you to specify the position of nodes explicitly, for example: https://github.com/cytoscape/cytoscape.js/blob/master/documentation/demos/compound-nodes/code.js
There is no way to layout "magically" like dagre does.
Correct me if I am wrong.
Update: there are layout extensions for cytoscape.js
: https://github.com/cytoscape/cytoscape.js-cose-bilkent
@tylerlong There is a Dagre layout in cytoscape : http://js.cytoscape.org/demos/dagre-layout/ It just need to be configured in the layout settings.
The following code produces an error due to the edge from A -> group.
in dagre.core.js line 3054. The issue disappears when I remove the edge from A->group. However, that is exactly what I need. The node "group" disappears when rendering the graph. I have tried to find out who is removing the node. At some point the group node disappears from the _nodes list.
Can you provide me with some pointers how to get started tracking down that bug? I know graphviz does not support nodes to clusters directly (it does with a nasty trick that does not work half the time) but I believe that would be a natural and valuable addition.