Hi,
I created a networkgraph with a simple hierarchy, but after the initial render (I set simulate = false, maxIterations = 500), I don't like the position of the center node. My example hierarchy is like (attached picture shows one more level, but that is not important for the end result I'm after):
Grandparent (main node)
- Parent 1
- - Child 1
- - Child 2
- Parent 2
- - Child 1
Then after render, the two children are positioned too close to each other, but when I drag the main node to somewhere else, the children move to a more likeable position. Originally I tried with an initial position for one of the nodes, but when the bubbles are then rendered, they move away from the initial point to something that has been calculated. When dragging one of the bubbles, the calculation repositions all the other nodes again.
So I've been trying to figure out how to get my hands on the drag-event. If I can call the drag event programmatically instead of manually dragging a node, then I can determine where I want my main node to be.
I already tried keeping a reference to the actual main node point and set the plotX and plotY, but when moving my mouse over the chart to refresh it, it only moves the node I've updated, but not the others.
So long story short: I need a simple way to move a node to a different location after it has all rendered, whereby all other nodes are automatically repositioned, the same that happens when actively dragging a node.