🌍 Public
Viewing a saved revision (read-only)
730b31102ac6401183e4b7c6b7ed6d83
Force Directed Graph Starter
This example demonstrates a minimal force-directed graph with three nodes connected by two links using D3's force simulation. It shows how SVG circles and lines update their positions on each simulation tick. The code defines data arrays for nodes and links, then applies `d3.forceSimulation` with `forceManyBody`, `forceLink`, and `forceCenter` forces. Rendering targets an SVG container of 960 by 500 pixels, using the standard D3 data join pattern to manage elements.
AI-generated descriptionA D3 force simulation
See also React Starter.