🌍 Public
Viewing a saved revision (read-only)
d0ff8af479744b1ebe85128e658b9ffb
Fork of HTML Starter
This example shows a small network of five fictional actors linked in a chain, using a force-directed layout to position the nodes. The graph uses SVG elements for rendering, with circles for nodes and lines for links, and includes interactive drag-and-drop functionality. The code builds the visualization with the D3.js library and its force simulation API, specifically using `d3.forceSimulation` for the physics, `d3.forceLink` for the link constraints, `d3.forceManyBody` for repulsion, and `d3.forceCenter` to keep the graph centered. Labels are added as SVG text elements, and the simulation updates node positions on each tick.
AI-generated description