Skip to main content
100%

Fork of D3 v5 Zoomable Sunburst

✓ Published0🌍 Public
Kksookdeo
Last edited Aug 29, 2022
Created on Aug 29, 2022

This zoomable sunburst diagram visualizes the hierarchical Flare dataset, showing the relative sizes of categories and subcategories through nested arcs. Built with D3 v5, it uses `d3.hierarchy`, `d3.partition`, and `d3.arc` to render the SVG, with an ordinal color scale based on `d3.interpolateRainbow`. Clicking a node triggers smooth animated transitions via `transition.attrTween` and `d3.interpolate`, rescaling arcs and labels to zoom into the selected branch. Labels rotate and reposition based on arc angles, and tooltips via `title` show full paths and numeric values.

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