D3 v5 Zoomable Sunburst
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 descriptionMike Bostock's D3 Zoomable Sunburst example
- with D3 v5 (based on the changes in v5)
<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