Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published2🌍 Public
苏苏巨亮
Last edited Apr 15, 2020
Created on Apr 14, 2020

This example shows a zoomable sunburst visualization of the hierarchical flare dataset, where clicking a ring zooms into that subtree and clicking the center returns to the root. The code uses D3 v5’s `d3.partition` and `d3.arc` to compute and draw the arcs, with `d3.interpolateRainbow` for color mapping and `transition.attrTween` for smooth animated zooms. Labels rotate and fade based on visibility criteria, and the data is loaded via the Observable `@observablehq/flare` package with the page rendered as SVG.

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