Skip to main content
100%

D3 Example

✓ Published0🌍 Public
Ttgu007
Last edited Nov 14, 2021
Created on Nov 13, 2021
Forked from HTML Starter

This example demonstrates a basic force-directed network graph with three nodes and two links, rendered as SVG circles. The visualization uses `d3.forceSimulation` with `forceManyBody`, `forceLink`, and `forceCenter` forces to position the nodes, while a tick event updates each circle’s `cx` attribute based on the simulated x-coordinates. The code defines nodes and links as static arrays, with positions calculated entirely by the physics simulation. The example relies on D3 v6 and selects an SVG container by ID, but the script tag references a missing `bundle.js` file, so the simulation may not execute in practice.

AI-generated description
MIT Licensed

Similar vizzes