Skip to main content
100%

Untitled

✓ Published0🌍 Public
Aarydob
Last edited May 17, 2021
Created on May 17, 2021
Forked from Hello VizHub

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.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes