⚡ ChargeForce
chargeForce
allows configuring the charge force. A negative value **repels** the nodes, while a positive value **attracts** them.
📌 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} chargeForce={{ strength: -30 }} />
);
🎮 Playground
Charge Force
Charge Force:
A negative value repels the nodes. A positive value attracts them.