question
This stacked bar chart displays the estimated religious composition of the 20 most populous countries in 2010, using data from the Pew Research Global Religious Landscape. Each bar represents a country’s total population in millions, segmented by religion and colored via d3.scaleOrdinal with the schemeCategory10 palette. Hovering over a legend item highlights bars for that religion and fades others, while also drawing a stroke around matching segments. The visualization is built with D3’s stack layout to compute layer offsets and flatRollup to structure the data, with axes rendered by the @curran/responsive-axes component.
AI-generated descriptionStacked bars showing estimated religion breakdown of the most populous 20 countries in 2010. Based on an example from the tutorial Splitting Charts. Interactions:
- Hover over the legend to highlight religions.
Data is from The Global Religious Landscape by Pew Research, generated using this processing script.