Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published0🌍 Public
Ttorstendahlen
Last edited Apr 30, 2019
Created on Apr 29, 2019

This zoomable sunburst visualizes the flare dataset, a hierarchical collection of file sizes. The visualization displays the hierarchy as concentric rings, where each ring segment represents a node, with size proportional to its value. Users click on a segment to re-center the view on that subtree, and click the central circle to zoom back out. Built with D3 v5, it uses `d3.hierarchy` and `d3.partition` for layout, and `d3.arc` for rendering paths. Interactions are animated via SVG `transition` and `attrTween` methods, with color mapping from `d3.scaleOrdinal` and `d3.interpolateRainbow`. The data is loaded from the `@observablehq/flare` dataset.

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