Example Icicile
This example presents a zoomable icicle chart, a space-filling visualization of hierarchical data where nested rectangles represent tree nodes. The visualization renders the Flare-2 dataset as an SVG and partitions it using `d3.partition`, then colors nodes by a quantized rainbow ordinal scale. Users animate transitions with `selection.transition` to zoom in on a clicked subtree, adjusting rectangle heights and label opacity along the way. The code also dynamically recomputes the target layout coordinates for each node during the zoom animation.
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.