Skip to main content
100%

Tree Example

✓ Published0🌍 Public
Ppasyasahas
Last edited Jul 16, 2023
Created on Jul 16, 2023
Forked from Hello VizHub

This example displays an animated, collapsible tree diagram representing a three-level family hierarchy, with nodes showing names and links connecting parents to children. Clicking a node toggles the visibility of its subtree, smoothly transitioning the layout as branches expand and collapse. Built with D3.js version 3.5.17, the visualization uses the `d3.layout.tree` and `d3.svg.diagonal` APIs to compute the node positions and draw curved link paths, while SVG transitions animate the changes over 750 milliseconds. The data is hardcoded as a nested JavaScript array in the HTML file.

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