Skip to main content
100%

D3 v5 Zoomable Sunburst

✓ Published81🌍 Public
MMarkus
Last edited Dec 27, 2019
Created on Apr 2, 2019

This example visualizes the hierarchical structure of the Flare data set as a zoomable sunburst diagram, where clicking on a segment re-centers the view on that part of the hierarchy. The visualization uses D3 v5’s `d3.arc`, `d3.partition`, and `d3.transition` (with `transition.attrTween`) to animate the resizing of arcs and labels. Colors are assigned via `d3.scaleOrdinal`, while `d3.hierarchy` and `d3.hierarchy.sum` preprocess the data, which is loaded from the Observable `@observablehq/flare` library (provided as both CSV and JSON).

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