Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published2🌍 Public
Aarvind75
Last edited Jun 26, 2020
Created on Jun 26, 2020

This interactive sunburst chart visualizes hierarchical data from the Flare dataset, representing the size of each node through the arc’s angular width and radial extent. Users click any arc to zoom into that subtree, with smooth 750-millisecond transitions applied via `transition.attrTween` and `d3.interpolate`. The visualization uses D3 v5’s `d3.hierarchy`, `d3.partition`, and `d3.arc` to generate SVG paths and labels, with `d3.scaleOrdinal` and `d3.interpolateRainbow` providing color encoding. The Observable HQ standard library’s `require` method loads the data from the `@observablehq/flare` 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