Specifying parent-child relationship in Draw.io diagram using CSV

157 views Asked by At

Using CSV data as input I want to create multiple "container" shapes in Draw.io where each container shape has multiple child shapes.

Think UML Activity diagrams where there are multiple swim lanes and in each swim lane are multiple process steps. I want to create the swim lanes and the process steps.

Sample code

Sample Code:

#label: %Title%
# stylename: shapeType
# styles: {"mycontainer": "shape=swimlane;startSize=23;", \
#          "mystep": "shape=ellipse;whitespace=wrap;html=1;"}
# namespace: csvimport-
# connect: {"from":"Column 1", "to":"Column 3", "style":"curved=0;endArrow=blockThin;endFill=1;"}
##
Title,shapeType
Customer,mycontainer
Pickup phone,mystep
Dial a number,mystep
Talk,mystep

Above sample code is a no-frills code. It creates the shapes but there is no relationship between them. I want the ellipses to be automatically embedded (positioned) within the container, as shown. Please can someone tell me whether it is possible and if yes provide a sample script on how to do this. It would be excellent if someone can show a working example with multiple swim lanes.

Actual and Expected output

0

There are 0 answers