dagre icon indicating copy to clipboard operation
dagre copied to clipboard

Compound Graph: Unable to draw edge from a child node to a parent node. Error: Uncaught TypeError: Cannot set property ‘rank’ of undefined

Open thenylify opened this issue 6 years ago • 6 comments

I’m currently using dagre.js for my visualisation graph, it’s great. But I can’t draw any edge from a child node to a parent node, if I try to do so I will get the following error: Uncaught TypeError: Cannot set property ‘rank’ of undefined.

I think this is a bug, but I can’t find a way to fix this issue. The parent of a node is a node, so we should be able to draw edges to it.

Can someone please help?

Much appreciated, Michael

thenylify avatar Mar 22 '18 14:03 thenylify

Here's an example that has loop in it (1 -> 2 -> 5 -> 1) and there doesn't seem to be any problem? http://jsfiddle.net/xe4wvqoa/1/

jemerald avatar Jun 26 '18 04:06 jemerald

@jemerald Hi, I think you misunderstood my problem here. The problem is that I couldn't draw an edge from a node to a parent node which contains a nested node. Does this make sense? Please see the question description in this link as I included more descriptions https://github.com/dagrejs/dagre-d3/issues/319

Thanks!

thenylify avatar Jun 27 '18 06:06 thenylify

Any workaround ?

ChanDaoH avatar Nov 11 '19 07:11 ChanDaoH

Is there a solution?I have the same problem

yangxiaoqiao2016 avatar Nov 12 '19 03:11 yangxiaoqiao2016

also looking for a solution. any updates? any pointers to places in the codebase to look at?

terrencekuo avatar Jul 05 '20 21:07 terrencekuo