score:11

Accepted answer

i recommend you to read the documentation of the force layout. it is really good.

as you mentioned, you have to set the px and py attributes for each node. then, you can set the attribute fixed to true in each node.

this will imply that computing force.start() won't have any effect.


another thing you can try is to set the alpha value to 0, and then start the simulation:

force.alpha(0)
    .start()

i am not sure whether this method works. post a jsfiddle if it does not.


Related Query

More Query from same tag