🌍 Public
Viewing a saved revision (read-only)
a518b453c3a9410487a78aa4cb57ff58
Collapsible Tree Final Version 1
This collapsible tree diagram displays a hierarchical dataset of 10 nodes, which can be expanded and collapsed by clicking on circular markers. Built with D3 v4, the visualization uses SVG rendering and animated transitions to smoothly reposition nodes and links as the tree structure changes. The layout is computed via a custom layout function that assigns x and y coordinates based on node depth and index, while the zoom behavior is implemented through `d3.zoom()`. The initial view collapses all nodes except the root, and clicking a node toggles its children on or off.
AI-generated description