question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Edges to Subgraphs (Clustering)

See original GitHub issue

The following code produces an error due to the edge from A -> group.

 var g = new graphlib.Graph({compound:true});
 g.setGraph({});
 g.setNode("A", {label:'A'});
 g.setNode("B", {label:'B'});
 g.setNode("group", {label:''});
 g.setParent("B", "group");
 g.setEdge("A", "group", {label:''});
 g.graph().marginx = 20;
 g.graph().marginy = 20;
 g.graph().transition = function(selection) {
   return selection.transition().duration(500);
 };

 console.log(g.node("group"));
 d3.select("svg g").call(render, g);

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.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:21
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
tylerlongcommented, Apr 12, 2018

@Tichau Thanks for the information. But if we use dagre layout in cytoscape, we will still have this issue because it’s a dagre issue instead of a rendering engine issue.

Recently I am investigating elkjs which seems to be as flexible as dagre.

2reactions
Tichaucommented, Sep 25, 2017

On my side, I have finally used cytoscape.js to handle the display of hierarchical graphs (in case it can help someone).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clustering Using Graph Connectivity
The clustering algorithm we will give splits a given graphs into highly connected subgraphs, which are then identified as the clusters we seek....
Read more >
[2202.12265] Clustering Edges in Directed Graphs - arXiv
We develop a framework for edge clustering, a new method for exploratory data analysis that reveals how both vertices and edges collaboratively ...
Read more >
HCS clustering algorithm - Wikipedia
The HCS (Highly Connected Subgraphs) clustering algorithm is an algorithm based on graph ... subgraphs contain more than n/2 edges, and identifies them...
Read more >
On the modification Highly Connected Subgraphs (HCS ...
Highly Connected Subgraphs (HCS), is a method of graph clustering to find out the cluster based on its edge connectivity. This method.
Read more >
Graph Mining: Highly Connected Subgraph Clustering: Learn ...
What is Subgraph? Does connectivity indicate the number of edges between clusters? True or false: Highly connected clustering means: within ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found