Skip to main content
100%

Grouped Bar Chart with Crossfilter

✓ Published0🌍 Public
TThanaporn-sk
Last edited Mar 9, 2017
Created on Mar 9, 2017

This grouped bar chart displays state populations across seven age ranges, with each state’s bars clustered along the x-axis and a color-coded legend for age groups. Built with D3.js and Crossfilter, the code loads data via `d3.csv`, uses `d3.scale.ordinal` for positioning and color, `d3.scale.linear` for the y-axis, and `d3.nest` to structure grouped data. Crossfilter dimensions and groups aggregate the CSV records, while `d3.svg.axis` renders axes and `d3.format` applies SI prefixes. The SVG output includes hover-free static bars and a legend.

AI-generated description

This is a fork of mbostock's grouped bar chart example, to demonstrate how to use crossfilter to produce the same result.

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/danroberts/'>danroberts</a>'s block: <a href='http://bl.ocks.org/danroberts/cc6f3159f49fed6f6a8d'>Grouped Bar Chart with Crossfilter</a>

forked from <a href='http://bl.ocks.org/wqm9425/'>wqm9425</a>'s block: <a href='http://bl.ocks.org/wqm9425/ba84edd4b03947ec426f3b0c475e8638'>Grouped Bar Chart with Crossfilter</a>

mit Licensed

Similar vizzes