Example of zoomable icicle
This zoomable icicle chart displays hierarchical data from the Flare-2 dataset, with rectangles colored by top-level category and sized by value. Users click any rectangle to zoom into that subtree, smoothly animating the layout’s scale and position. Built with D3 v7, it uses `d3.partition()` to compute the icicle layout, `d3.scaleOrdinal` with `interpolateRainbow` for colors, and `d3.json()` to load data. The SVG rendering uses transitions to animate rectangle heights, transforms, and label opacity, with tooltips showing the full ancestor path and formatted values.
AI-generated descriptionA port of Observable: Zoomable Icicle by Mike Bostock to vanilla JavaScript.
The content of this work is not original - I just ported it to vanilla JavaScript. That process includes:
- Flattening the reactive data flow into a sequence of expressions,
- uploading the dataset to a Gist: Flare-2 Dataset
- renaming variables to avoid collisions with D3 imports (e.g.
partition). - minor framing work such as removing margin and scrollbars on the body.
This port was done in response to this VizHub Forum Post: Zoomable Icicle in React.