I'm encountering an unusual issue that I can't seem to resolve by referring to the vis.js documentation.
My network has a fixed hierarchy with a specific level defined for each node.
I have a total of 51 nodes, and everything looks like this:
https://i.sstatic.net/UZNgy.png
However, when I add another node at the bottom of the network (bringing the total to 52), the layout completely changes. The nodes shift positions in an attempt to fill the white space, resulting in this visualization:
https://i.sstatic.net/6cc48.png
Despite trying various options, I haven't been successful in resolving this issue.
Here are the current options I am using:
options = {
layout: {
improvedLayout: false,
hierarchical: {
enabled: true,
levelSeparation: 150,
nodeSpacing: 110,
treeSpacing: 200,
blockShifting: false,
edgeMinimization: true,
parentCentralization: true,
direction: "LR",
sortMethod: "directed",
shakeTowards: "roots"
}
},
interaction:{
tooltipDelay: 100
},
edges: {
font: {
size: 0
}
},
nodes: {
shape: 'circle'
},
physics: false
};
If you have any suggestions or solutions, I would greatly appreciate it.
Thank you!