So i have a page already which draws a force directed graph, like the one shown here.
And that works fine. I\'m using the JS from here, with a few tweaks to spread o
I have 'solved' the problem with this:
nodes[0].x = width / 2;
nodes[0].y = 100;
nodes[0].fixed = true;
force.on("tick", function(e) {
var kx = .4 * e.alpha, ky = 1.4 * e.alpha;
links.forEach(function(d, i) {
d.target.x += (d.source.x - d.target.x) * kx;
d.target.y += (d.source.y + 80 - d.target.y) * ky;
});
[...]
}
http://mbostock.github.io/d3/talk/20110921/parent-foci.html
It's not exactly what we wanted but better as before. Importend is, that you define a "root"-Node and fixed it.
nodes[0].fixed = true;
It look like more as a tree but so it is clearer.