Force Directed Graph Starter
✓ Published1🌍 Public
This example demonstrates a simple force-directed graph with three nodes and two links, rendered as SVG circles and lines inside a fixed 960×500 viewport. It shows Alice, Bob, and Carol connected in a chain, with nodes repelling each other and links acting as springs. The visualization uses `d3.forceSimulation` with `forceManyBody`, `forceLink`, and `forceCenter` to compute positions, updating the circle and line attributes on every simulation tick. The code selects elements via `d3.select` and binds the hardcoded nodes and links arrays using data joins.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed