- Home
- Forum
- Angular - EJ 2
- How to dynamically add a BPMN Pool to a diagram?
How to dynamically add a BPMN Pool to a diagram?
How would I add a pool, with say 3 lanes, dynamically to the diagram?
5 6
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".
Error: <rect> attribute width: Expected length, "NaN".
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…".
SIGN IN To post a reply.
3 Replies
SG
Shyam G
Syncfusion Team
September 18, 2019 05:16 AM UTC
Hi Charlie,
You didn't set swimlane width and height in your code example, so only the swimlane is not rendered during runtime. We have modified your code example and provided below.
Code example:
|
//add swimlane
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, width: 300, height: 500
}); |
Please refer to below help documentation to know more about swimlane.
Help documentation: https://ej2.syncfusion.com/angular/documentation/diagram/swim-lane/#create-a-swimlane
Regards,
Shyam G
SS
Swetha Srikumar
Syncfusion Team
September 18, 2019 08:53 AM UTC
Hi,
Can I request a feature in which case to give a friendly error message rather than the error I received which was not as informative as your good selves?
It may also prevent further such support tickets from us Rookies :)
Thanks
Charlie
SG
Shyam G
Syncfusion Team
September 19, 2019 12:29 PM UTC
Hi Charlie,
Reported Issue : Exception raised while not setting its size in swimlane rendering
We have confirmed this as a defect. We have logged a defect report for this issue. We will fix this issue and include it in our volume 3, 2019 release which is scheduled to release by end of September, 2019.
Now, you can track the status of your request through below feedback link.
Feedback Link: https://www.syncfusion.com/feedback/8966/exception-raised-while-not-setting-its-size-in-swimlane-rendering
Regards,
Shyam G
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
CB Charlie BengerStevenson
- Sep 17, 2019 07:53 AM UTC
- Sep 19, 2019 12:29 PM UTC