Fork of ice-7 q2
✓ Published2🌍 Public
This example shows the distribution of air quality categories—such as Good, Moderate, Unhealthy, and Unhealthy for Sensitive Groups—as a pie chart with an interactive legend and tooltip. Using d3.rollup to aggregate counts from a hardcoded dataset, the SVG chart assigns each category a color-coded slice and displays its proportion. The code relies on D3 v7’s pie and arc generators, plus d3.select for DOM manipulation, with a tooltip that appears on hover.
AI-generated descriptionMIT Licensed