How would I add a pool, with say 3 lanes, dynamically to the diagram?
I am trying the following code to add the pool, so in theory I can call the addLanes method on the diagram object, but I am getting errors in the console
this.diagram.addNode({
shape: { type: 'SwimLane',
header: {
annotation: { content: 'Pool', },
height: 70, style: { fontSize: 11 , fill: 'pink' },
orientation: 'Horizontal',
}
},
id: "pool",
offsetX: 200,
offsetY: 200
});
errors
Error: <rect> attribute x: Expected length, "NaN".
5
Error: <rect> attribute width: Expected length, "NaN".
6
Error: <rect> attribute transform: Trailing garbage, "rotate(0,NaN,200.5)".
ej2-diagrams.es2015.js:16310 Error: <text> attribute transform: Trailing garbage, "rotate(0,NaN,200.5)transl…".