Fork of Zoomable Icicle
This example shows a zoomable icicle chart that visualizes the hierarchical Flare-2 dataset. A click on any rectangle zooms the view to that node, animating the layout and revealing the subtree; clicking the same node again zooms back out to its parent. The code uses React and the D3 v7 module, specifically `d3.hierarchy`, `d3.partition`, `d3.scaleOrdinal`, and `d3.quantize` to compute the layout and colors, while SVG elements are created and animated with `d3.select`, `.attr`, and `.transition`. The visualization renders in a full-window SVG with no margins or scrollbars.
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.