Force-Graph
✓ Published1🌍 Public
This example shows a force-directed graph of four named nodes connected by weighted links, rendered as SVG within a React framework. The code uses `d3.forceSimulation` with `d3.forceLink`, `d3.forceManyBody`, and `d3.forceCenter` to position nodes, while the simulation’s `tick` event updates node and link coordinates. Nodes are draggable via `d3.drag`, and links are colored using a `d3.scaleOrdinal` based on `d3.schemeCategory10`. Data is loaded from a local JSON file, and node labels are displayed as text elements.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed