D3.js - Different gravity for Nodes
MadeleineHeuer opened this issue · 1 comments
MadeleineHeuer commented
I need some help with D3.js. I created a network with this examplehttp://bl.ocks.org/GerHobbelt/3071239. I wanted to create a network with groups and a few nodes.The distance between the individual nodes should be small within a group. However, the distance between the groups should be large so that they do not overlap. Maybe it is possible to have different gravities between the nodes?
My example: https://codepen.io/lenichenmadeleine/pen/YzXLypm
Thanks for the answers and help :)
mbostock commented
I’d probably use a custom force for this, like here: