Donut Chart
✓ Published0🌍 Public
Mmbostock
Last edited Oct 8, 2018
Created on Oct 14, 2012
This donut chart displays the population distribution across seven age groups, from under 5 to 65 and older, using a ring of color-coded arcs. The chart is built with D3 v3, loading data from a CSV file via `d3.csv` and rendering SVG paths. It uses `d3.scale.ordinal` for color encoding, `d3.layout.pie` to compute arc angles from the population values, and `d3.svg.arc` to define the ring geometry with an inner and outer radius. Each segment includes a label positioned at the arc’s centroid.
AI-generated descriptionThis donut chart is constructed from a CSV file storing the populations of various age groups. The chart employs a number of D3 features:
- d3.csv - load and parse data
- d3.scale.ordinal - color encoding
- d3.svg.arc - display arcs
- d3.layout.pie - compute arc angles from data
gpl-3.0 Licensed