Skip to main content
100%

Pie chart

✓ Published0🌍 Public
FfaRriaN
Last edited Apr 22, 2020
Created on Apr 22, 2020
Forked from Pie chart

This interactive pie chart visualizes age-group distributions for six U.S. states, toggling between "apples" and "oranges" datasets via radio buttons. Built with D3.js v5, it uses `d3.pie` to compute arc angles, `d3.arc` for rendering donut segments, and `transition.attrTween` with an arc interpolation function to animate updates smoothly. A legend of colored dots and labels appears alongside the chart, with each state’s age categories mapped to a categorical color scale. The data loads from a local JSON file, and the SVG renders with styled strokes and transitions.

AI-generated description
MIT Licensed

Similar vizzes