29.Force-Directed Graph
✓ Published0🌍 Public
深深度碎片
Last edited Aug 4, 2016
Created on Aug 4, 2016
This example shows a force-directed graph of character co-appearances in *Les Misérables*, with nodes colored by group membership and link thickness scaled by interaction weight. Using D3 v4, it loads data from `miserables.json` and runs a `d3.forceSimulation` with `d3.forceLink`, `d3.forceManyBody`, and `d3.forceCenter` to compute positions. Nodes and links render as SVG circles and lines, and the visible `ticked` function updates their coordinates. The code also wires up `d3.drag` handlers to let viewers reposition nodes.
AI-generated descriptionBuilt with blockbuilder.org
gpl-3.0 Licensed