I first create a graph with 100's of connected nodes. After all the nodes have been added I call
cy.layout({name: "dagre"});
Next, I'm creating 5 or so additional connected nodes I call layout on the nodes added but it doesn't lay them out as expected. Instead of being more like a tree all the nodes are in a straight line.
I first create a graph with 100's of connected nodes. After all the nodes have been added I call
cy.layout({name: "dagre"});
Next, I'm creating 5 or so additional connected nodes I call layout on the nodes added but it doesn't lay them out as expected. Instead of being more like a tree all the nodes are in a straight line.
It looks like this:
collection.layout({ name: "dagre", fit: false, boundingBox: { x1: mousex - width / 2, y1: mousey - height / 2, x2: mousex + width, y2: mousey + height }, nodeSep: 30 }).run();
But I expect it to look like the image below.
In order to get it to look like the above, I call layout shown below.
I can't call cy.layout because it lays out the entire graph which is not what I want.
I've looked through all the options for a dagre layout and can't find anything to make it create the tree.