Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published0🌍 Public
MMatheusHALeal
Last edited Nov 2, 2019
Created on Nov 2, 2019

This zoomable sunburst chart visualizes hierarchical spending data from the flare.json dataset, with arcs colored by top-level category and sized by expense sums. Users click arcs or the center circle to zoom between hierarchy levels, while labels rotate and fade based on visible arc size. Built with D3 v5, it uses the `d3.partition` layout, `d3.hierarchy`, and arc generators for SVG rendering. Transitions employ `transition.attrTween` and interpolation to animate arc paths and labels smoothly, with style updates handled through attribute tweens and fill-opacity transitions.

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