Skip to main content
100%

Example Icicile

✓ Published0🌍 Public
JJonathan Kurniawan
Last edited Oct 4, 2022
Created on Oct 4, 2022
Forked from Zoomable Icicle

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 description

A 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.

ISC Licensed

Similar vizzes