Force-Directed Layout
This example visualizes the character co-occurrence network from *Les Misérables* using a force-directed layout with animated node and link appearance. Nodes fade in sequentially, and links become visible only after both connected nodes have appeared. The code uses D3’s `d3.layout.force` for physics simulation and SVG circles and lines for rendering, with chained `transition()` calls and `delay` timing to stagger the entrance. Node color encodes group membership via `d3.scale.category20`, while link thickness reflects the edge value.
AI-generated descriptionForce graph with node-link show up through chaining …… <a href="http://bl.ocks.org/2511921" title="view this gist via bl.ocks.org">∆</a> <a href="http://bl.ocks.org/GerHobbelt" title="view a list of all my gists at bl.ocks.org">∞</a>
Derived from gist 1125997, but now shows the nodes appear incrementally.
This variant also chains the display of the links; links are only shown once their nodes are visible; then they are faded in all at once.
The alternative, which fades in all relevant links one by one (by chaining) for each node which shows up, see gist 2514183.