Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Collapsible Tree Hierarchy Reformatted

Public visualization

Viewing a saved revision (read-only)

f43852466da246b7aee7bb4f19dde47d

Collapsible Tree Hierarchy Reformatted

0 stars1🌍 Public
QQuinn Sebso
Last edited May 7, 2024
Created on May 7, 2024

This example presents an interactive collapsible tree visualization built with React and D3.js v6. Clicking a node re-roots the hierarchy to that node, toggling its children open or closed while animating transitions between states. The SVG rendering uses `d3.tree`, `d3.hierarchy`, and `transition.attrTween` to smoothly update node positions and link paths over 250-millisecond durations. A pop-up div displays the clicked node’s ID and name, positioned dynamically within the viewport.

AI-generated description

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

See also React Starter.