Collapsible Tree
✓ Published0🌍 Public
GGolodhros
Last edited Jun 4, 2020
Created on Jun 4, 2020
This example shows a hierarchical dataset from `flare.json` as a collapsible tree layout. Clicking a node toggles its children, animating the expand and collapse with transitions. The code uses `d3.layout.tree` to compute positions, `d3.svg.diagonal` for curved links, and SVG elements for rendering. Nodes and links are updated via data joins and `transition` calls, with entering and exiting elements animated from the parent’s position.
AI-generated descriptionAn interactive version of a Reingold–Tilford tree. Click on the nodes to expand or collapse.
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4339083'>Collapsible Tree</a>
gpl-3.0 Licensed