Fork of Fork of Fork of Interactive Stacked Bar Chart
This interactive stacked bar chart visualizes the population of the world's most populous countries, segmented by religion, based on 2010 Pew Research data. Built with D3.js, it uses the `flatRollup` and `stack` functions to aggregate and stack the data. Each bar represents a country, showing the estimated breakdown of religious groups. Hovering over the interactive color legend highlights that religion across all bars, with a corresponding stroke on the chart's segments, facilitating easy comparison of religious demographics.
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.
//<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/lAOgD_udvTw?si=IcgXd8VRMcC2QaGd" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>