Skip to main content
100%

Fork of D3 v5 Zoomable Sunburst

✓ Published0🌍 Public
LLiml
Last edited Sep 10, 2024
Created on Mar 28, 2024

This interactive sunburst chart visualizes hierarchical data from the Observable Flare dataset, with each arc representing a node and its size proportional to its value. Users click on arcs to zoom into that subtree, triggering a smooth 750ms animation that repositions and rescales all visible elements. The visualization is built with D3 v5, using `d3.hierarchy`, `d3.partition`, and `d3.arc` to compute the layout, while color encoding is derived from a rainbow interpolator applied to top-level branches. Transitions employ `transition.attrTween` with an interpolator to animate arc paths and labels during zoom interactions.

AI-generated description

Mike Bostock's D3 Zoomable Sunburst example

<br></br> Ported from this Observable notebook for this forum thread. Many thanks to Bryan Gingechen who answered my question about the necessary steps to get from an (Observable) JavaScript notebook to a vanilla JavaScript index.html. He presented his solution on blockbuilder.org

MIT Licensed

Similar vizzes