Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published0🌍 Public
MMarwanElfatrani
Last edited Jul 1, 2020
Created on Jul 1, 2020

This zoomable sunburst visualization displays the hierarchical Flare dataset, showing the relative sizes of categories and their subcomponents through concentric, color-coded arcs. Users can click on any segment to zoom into that branch, with animated transitions expanding and rotating the view around the central circle. The code uses D3 v5's `d3.hierarchy`, `d3.partition`, and custom `d3.arc` generators to draw SVG paths, while `transition.attrTween` and `d3.interpolate` handle the smooth geometric morphing between views. Data loads from the `@observablehq/flare` package via the Observable stdlib's `require` module.

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