d3 / d3-force

Force-directed graph layout using velocity Verlet integration.

Home Page:https://d3js.org/d3-force

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

D3.js - Different gravity for Nodes

MadeleineHeuer opened this issue · comments

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 :)

I’d probably use a custom force for this, like here:

https://observablehq.com/@d3/clustered-bubbles-2