Collapsible Tree Example
✓ Published0🌍 Public
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 descriptionMy first d3 attempt to visualise ABNB revenue from the pre-IPO S-1.
MIT Licensed