Skip to content

Type Alias: LinkWeightMode ​

ts
type LinkWeightMode = 'strength' | 'distance' | 'none';

What a link's weight (link.value) does, relative to the median weight of the graph:

  • 'strength': a heavier link pulls harder (both algorithms);
  • 'distance': a heavier link is shorter. 'spring': its rest length is linkDistance divided by the relative weight, kept within a quarter to four times linkDistance. 'forceatlas2' has no rest length, so this is the same as 'strength' there;
  • 'none': weights are ignored.

Released under the MIT License.