Skip to main content
100%

Fork of Tree Example

✓ Published0🌍 Public
Ffkukcha
Last edited Oct 30, 2022
Created on Oct 30, 2022
Forked from Tree Example

This example shows an interactive hierarchical tree diagram built with D3.js, where users can click nodes to expand or collapse their children. The visualization renders a family tree with named individuals such as Roshan, Nimmat, and Salim, using SVG circles and text labels connected by curved diagonal paths. The code uses `d3.layout.tree` to compute the layout, `d3.svg.diagonal` for the links, and transitions on node and link elements to animate position changes smoothly over 750 milliseconds. Data is embedded directly as a JavaScript object array, and each node’s color shifts to lightsteelblue when collapsed.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes