Skip to main content
100%

Collapsible Tree Example

✓ Published0🌍 Public
Eemberix@gmail.com
Last edited Dec 10, 2020
Created on Dec 10, 2020
Forked from ABNB Revenue

This interactive collapsible tree diagram displays a hierarchical dataset with a top-level node branching into two second-level nodes and sub-nodes. Using D3 v6’s `d3.layout.tree` and `d3.svg.diagonal`, it renders nodes as white circles with steelblue strokes and connecting links, positioning them by depth. The SVG layout is fixed-depth, with nodes manually offset horizontally based on hierarchy level. The example’s markup references an Airbnb S-1 revenue dataset, but the code itself uses static inline tree data for the visualization.

AI-generated description

My first d3 attempt to visualise ABNB revenue from the pre-IPO S-1.

MIT Licensed

Similar vizzes