Skip to main content
100%

Fork of Zoomable Icicle

✓ Published0🌍 Public
TTony Brown
Last edited Feb 12, 2022
Created on Feb 12, 2022
Forked from 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 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