Graph Visualization
✓ Published0🌍 Public
This example demonstrates a basic force-directed graph with three nodes connected by two links. The visualization uses D3’s `forceSimulation` with `forceManyBody` for repulsion and `forceLink` to define the edges, rendering nodes as SVG circles. The simulation updates node positions on each tick, which are applied to the circles’ `cx` and `cy` attributes. The data consists of a simple array of node IDs and link indices, drawn directly into an SVG container.
AI-generated descriptionMIT Licensed