Untitled
This example shows a collapsible tree diagram of a small hierarchical dataset with four labeled nodes. Users can click nodes to expand or collapse their children, triggering smooth animated transitions of the SVG links and circles. The code uses `d3.hierarchy`, `d3.tree`, and `d3.selectAll` with transition methods to update node positions and draw curved diagonal paths. Node and link styling is applied via CSS classes, with collapsed nodes rendered in lightsteelblue.