Skip to main content
100%

Stacked Bar Chart

✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Aug 9, 2011

This stacked bar chart displays mortality causes among British troops during the Crimean War by month from 1854 to 1856, breaking down deaths into wounds, other, and disease. Using D3 v3’s stack layout, the code computes cumulative layer offsets and renders each cause as a distinct colored bar segment with ordinal time-scaled x-axes and a linear y-axis. The SVG visualization, styled with category10 colors, loads tab-separated data via `d3.tsv` and leverages `d3.svg.axis` for formatted month and tick labels.

AI-generated description

A recreation of a Protovis example in D3 using the stack layout.

gpl-3.0 Licensed

Similar vizzes