Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Collapsible Tree Version 2

Public visualization

Viewing a saved revision (read-only)

712e47c4b4524a6ab812e80f46d2ebe6

Collapsible Tree Version 2

2 stars5🌍 Public
Rrainyrainyguo
Last edited Nov 24, 2020
Created on Nov 20, 2020

This collapsible tree visualization shows hierarchical data from a JSON file, where nodes can be clicked to expand or collapse their children. The tree layout is computed using the `d3.tree()` layout algorithm with horizontal links drawn via `d3.linkHorizontal()`. The visualization uses D3 v6 and SVG rendering, with smooth animated transitions (250ms or 2500ms with Alt key) applied to node positions and the viewBox. Clicking a node toggles its children and also collapses any other nodes with the same name, with the tree recompiled via `d3.hierarchy()`.

AI-generated description