Skip to content

Type Alias: ForceAlgorithm ​

ts
type ForceAlgorithm = 'spring' | 'forceatlas2';
  • 'spring': the d3-force model. Links are springs with a rest length, every pair of nodes repels, velocities decay and the whole cools on a fixed schedule. Even link lengths; the usual choice up to a few thousand nodes.
  • 'forceatlas2': the ForceAtlas2 model (Jacomy et al. 2014). Links attract in proportion to their length, nodes repel in proportion to their degrees, and the step size adapts to how much the nodes swing. It pulls communities apart better on graphs with hubs.

Released under the MIT License.