Force-Directed Graph: Collapsible, Hierarchical
This example shows a hierarchical force-directed graph of the Flare software package’s class hierarchy, where collapsible nodes reveal or hide their children. The visualization uses d3.layout.force for physics simulation, with node size encoding the `size` attribute from the flare.json data source and color distinguishing leaf nodes from internal ones. Rendering is done with SVG circles and lines, animated on each tick. Clicking a node toggles its children, and custom constraints in the tick handler enforce a vertical hierarchy where child nodes remain below their parents.