Radial Stacked Bar
This example shows the population distribution of U.S. states across age groups using a radial stacked bar chart, where each state occupies a wedge and the stacked segments represent age categories. The chart uses d3.stack to compute the stacked series, d3.scaleBand for the angular axis, and a custom d3.scaleRadial for the radial extent. It renders SVG paths via d3.arc with padded angles, and includes circular grid lines, state labels rotated around the perimeter, and a legend for age groups. The data comes from a CSV file.
AI-generated descriptionThis is a radial variant of my earlier example stacked bar chart. While pretty, you probably don’t want to use this version because it’s easier to compare the bars when they share an aligned (linear) axis. You might consider this form if your ordinal axis is cyclical, such as weeks of the year, and you want to show a cyclical pattern. This example’s data is not cyclical, so the use of a radial form here is rather gratuitous!
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/6fead6d1378d6df5ae77bb6a719afcb2'>Radial Stacked Bar</a>
forked from <a href='http://bl.ocks.org/63anp3ca/'>63anp3ca</a>'s block: <a href='http://bl.ocks.org/63anp3ca/0f06bf09de52ef8faab1b78c90a76c8d'>Radial Stacked Bar</a>