Do you want the elements in the diagram to form a rectangle? Do you want the position of the elements to be automatically calculated based on the number of elements? Let’s take a look at the demo below.
Set the number of elements and change the spacing between them by using the slider bar.
The source code of this demo is available as part of the JointJS+ commercial license. Don't have a license yet? Start a trial and use the source code of this and many other demos for free, with no obligations, for 30 days.