Open jsommr opened 6 years ago
I was getting the same error, bringing me to your post. Your example does not currently have any usage of parent. When I run the example, it doesn't render because the SVG dimensions are incorrect.
By changing the SVG line to the following, your first example works:
<svg id="svg-canvas" width=500 height=500></svg>
In my case, I eventually realized my TypeError: label is undefined
error came from creating an edge between a child and a parent.
I suggest closing this issue and consider filing an enhancement request to make the error message more useful, assuming that is actually the cause of the error.
Possibly related: #152
When assigning a parent to a node, the rendering fails with
TypeError: label is undefined
.Example: http://jsbin.com/qemoqitowa/edit?html,output (look for "parent": "Flow TWO")
If I don't assign a parent, the graph is rendered correctly: http://jsbin.com/zozixipugo/edit?html,output (only difference is that "parent": "Flow TWO" is removed)