Skip to main content
100%

Grouped Bar Chart

✓ Published0🌍 Public
Aadkinsc
Last edited Oct 26, 2017
Created on Oct 26, 2017

This grouped bar chart displays state populations by age group, using color-coded bars for each age category across seven states. The visualization loads CSV data with d3.csv, encodes the x-position with d3.scaleBand and y-values with d3.scaleLinear, and assigns colors via d3.scaleOrdinal. It formats the y-axis tick labels with d3.format’s “s” SI prefix, computes domains with d3.max, and renders axes with d3.axisBottom and d3.axisLeft. A legend is appended manually, and the chart follows conventional margins with an SVG output.

AI-generated description

This grouped bar chart is constructed from a CSV file storing the populations of different states by age group. The chart employs conventional margins and a number of D3 features:

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/3887051'>Grouped Bar Chart</a>

gpl-3.0 Licensed

Similar vizzes