-
Notifications
You must be signed in to change notification settings - Fork 630
Open
Description
// code
const g = new dagre.graphlib.Graph({compound:true})
g.setGraph({ rankdir: 'TB', nodesep: 100, ranksep: 80,marginx:100,marginy:100,})
g.setDefaultEdgeLabel(() => ({}))
nodes.forEach((node) => {
const {width,height} = node.size()
const parentId = node?.parent?.id ?? undefined
if(parentId) g.setParent(node.id,parentId)
g.setNode(node.id, {label:${node.id}
,width, height})
})
dagre.layout(g)
// console error
chunk-YSKSNXDD.js?v=349623b9:5910 Uncaught TypeError: Cannot set properties of undefined (setting 'rank')
How should I solve this problem?
aldelucca1 and anbraten
Metadata
Metadata
Assignees
Labels
No labels