Normalized Stacked Bar Chart
✓ Published0🌍 Public
Mmbostock
Last edited Oct 27, 2018
Created on Oct 13, 2012
This normalized stacked bar chart displays the percentage distribution of age groups across U.S. states, sorting states by the proportion of their youngest residents. Using D3 v4, it applies `d3.stack` with `stackOffsetExpand` to scale each bar to full height, then renders SVG rectangles with an ordinal color scale for age categories. Axis labels are formatted as percentages, and a custom legend anchored to each bar’s final segment identifies each series. The chart loads population data from `data.csv` and sorts states in descending order of the "Under 5 Years" share.
AI-generated descriptionThis variation of a stacked bar chart shows percentages rather than absolute numbers.
gpl-3.0 Licensed