0

I am having troble in figuring out, how to set the distance between nodes in react-vis-force. Is there anyway to dynamically set link length based on the individual link? For example, some nodes are further apart than others.

YakovL
  • 7,557
  • 12
  • 62
  • 102
Atul kumar singh
  • 454
  • 10
  • 24

1 Answers1

0

Edges have the length property, have you tried that? If you define edges using vis.DataSet like this

edges = new vis.DataSet([edge1, edge2, ..]);

modifying edges[i].length should do the trick.

YakovL
  • 7,557
  • 12
  • 62
  • 102