dagrejs / dagre

Directed graph layout for JavaScript
MIT License
4.72k stars 606 forks source link

Unable to setParent from a child to parent which is a group of nodes #426

Open zeyupan888 opened 1 year ago

zeyupan888 commented 1 year ago

Hello all,

I want to integrate react-flow's subflow, like screenshot. I need to draw edge from a child node to parent node which contains many sub-nodes. The error is Cannot set parent in a non-compound graph

There are previous posts on this issue Compound Graph: Unable to draw edge from a child node to a parent node. Error: Uncaught TypeError: Cannot set property ‘rank’ of undefined #236

Unable to draw an edge from a child to parent compound graph #238

Do we have a solution on this?

image
AGontcharov commented 9 months ago

Experiencing the same issue. I'm unable to set an edge from a node to a parent node that contains sub nodes. Is there any workaround for this?

nawangwe commented 5 months ago

It seems support for this library is dead in the water.

sunteya commented 2 months ago

The compound parameter needs to be set

const g = new dagre.graphlib.Graph({ compound: true })