Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published0🌍 Public
CCommerce12
Last edited Jan 9, 2020
Created on Jan 9, 2020

This example shows a zoomable sunburst visualization of hierarchical data from a flare.json file, where the root nodes are cities and their children are food categories. Users can click on arcs or the central circle to zoom in and out of the hierarchy. The visualization uses D3 v5’s partition layout and arc generator to create the sunburst, with d3.interpolateRainbow providing color assignments by root category. It renders as SVG with smooth transitions via transition.attrTween, and labels use the d3.transition for animated rotation and positioning.

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