Skip to main content
100%

Zoomable Sunburst

✓ Published0🌍 Public
LLouis Astorg
Last edited Aug 1, 2022
Created on Jul 26, 2022

A zoomable sunburst chart visualizes hierarchical data from the Flare dataset, which is loaded asynchronously via the Observable standard library. The chart initially displays the full hierarchy, and clicking on any node smoothly animates it to the center while zooming into its descendants. Implemented with D3 v5, it uses `d3.hierarchy`, `d3.partition`, and `d3.arc` to render the arcs, with click transitions driven by `transition.attrTween` for geometry and opacity interpolation. The color scale uses `d3.scaleOrdinal` with an interpolated rainbow range, rendered as SVG.

AI-generated description

Mike Bostock's D3 Zoomable Sunburst example

  • with D3 v5 (based on the changes in v5) <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