Skip to main content

🔗 LinkForce

linkForce Is an optional prop that configures the strength and length of the links.


📌 Example Usage

const graphData = {
  nodes: [{ id: 1 }, { id: 2 }, { id: 3 }],
  links: [{ source: 0, target: 1 }, { source: 1, target: 2 }],
};

const MyGraph = () => (
  <Graph graph={graphData} linkForce={{ strength: 1, length: 100 }} />
);

🎮 Playground

Link Force

Link Strength:

Link Length: