Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published0🌍 Public
MMustafa-Esoofally
Last edited Dec 2, 2020
Created on Dec 2, 2020

This interactive sunburst visualization displays the hierarchical Flare dataset as concentric arcs, with clickable parent nodes that smoothly zoom into deeper levels of the hierarchy. Built with D3 v5, it renders arcs using `d3.arc` and computes the layout with `d3.partition` on a hierarchy created by `d3.hierarchy`. Animations are driven by `transition.attrTween`, interpolating between arc positions with `d3.interpolate`, while labels fade and rotate using `labelTransform` based on visible arc bounds. The example loads the Flare JSON data via the Observable standard library's `require` function and uses a `d3.scaleOrdinal` with an interpolated rainbow palette.

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