Image of my desired behaviour. Image of what I am getting
To get my desired behaviour I have to manually set height of the container like
<div id="container" style="height: 800px;"></div>
As I am dynamically importing data so height changes variably. I want height of my container to change with increasing no. of nodes, and I don't want my nodes to stack up in this way (Image of what I am getting). I want that the link between 2 nodes is always of some particular length.