Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published0🌍 Public
Jjeremypatio
Last edited Feb 26, 2020
Created on Feb 26, 2020

A zoomable sunburst diagram displays hierarchical data from the Flare library, partitioned into concentric rings that represent the root, categories, and leaf nodes. Clicking a sector re-centers the visualization on that branch, animating the arcs and labels to reveal deeper levels of the hierarchy. Built with D3 v5, the code uses `d3.partition` for the layout, `d3.arc` for rendering SVG paths, `d3.select` and `d3.transition` with `attrTween` for smooth updates, and `d3.scaleOrdinal` for color encoding. The visualization is rendered as SVG elements with a `g` group translated to the center, and the interactive zoom is triggered by click events on each path.

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