[HELP] d3 force simulation pushes everything far off

34 views
Skip to first unread message

pankaj dubey

unread,
Apr 18, 2017, 3:45:56 PM4/18/17
to d3-js

I am using d3-force simulation on a network with groups of linked nodes as well as single nodes.

The problem is: The force pushes everything far off.

What I would want is, the force should

  • open up connected linked nodes if theres overlapping
  • whenever a linked component is overlapping on another linked component
  • whenver single nodes are overlapping

The force shouldnt act on single nodes if they are already away and spaced out.
to only act on nodes which are linked and if they are pushed towards each other or 2 linked components are overlapping.


Example: https://jsfiddle.net/pdubey84/or0tn49k/1/


Notice how when a single node is moved it moves other nodes as well. I understand it is due to manybody force but is there a way to prevent that.

Reply all
Reply to author
Forward
0 new messages