One Path for All Links
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Jan 8, 2012
This example shows the character interaction network from *Les Misérables* as a force-directed graph, where all links are drawn as a single SVG path element. The path’s `d` attribute is rebuilt on every tick of the force simulation, joining each link’s source and target coordinates into one compact string. Nodes are rendered as circles positioned by the same `d3.layout.force` API, and the layout runs interactively with drag support. The data comes from the bundled `miserables.json` file.
AI-generated descriptiongpl-3.0 Licensed