D3 v5 Zoomable Sunburst
This zoomable sunburst visualization displays a hierarchical dataset of energy and capital categories, allowing users to click arcs to focus on a child node and its descendants or click the center circle to zoom back out. Rendered as an SVG using D3 v5, the chart uses `d3.partition`, `d3.hierarchy`, `d3.arc`, and a color scale based on `d3.interpolateRainbow`. Transitions between zoom levels are animated via `transition.attrTween` and `d3.interpolate`, with labels and arcs fading based on visibility. The data originates from the Observable `@observablehq/flare` dataset.
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