Force-Directed Graph
✓ Published0🌍 Public
Mmbostock
Last edited Jan 21, 2017
Created on Apr 22, 2016
A force-directed graph visualizes the co-occurrence of characters in Victor Hugo’s *Les Misérables*, rendered as nodes and links on a Canvas. Using D3 v4’s `d3.forceSimulation` with `d3.forceLink`, `d3.forceManyBody`, and `d3.forceCenter`, the layout iteratively positions nodes based on link forces. The animation updates on each tick, clearing the canvas and redrawing edges and nodes as gray lines and white-stroked circles. Data comes from the bundled `miserables.json` file.
AI-generated descriptionThis example demonstrates a force-directed graph computed using d3-force.
See also the draggable version.
gpl-3.0 Licensed