Skip to main content
100%

Fork of Interactive Stacked Bar Chart

✓ Published0🌍 Public
AAamir Hameed mir
Last edited May 26, 2024
Created on May 26, 2024

This interactive stacked bar chart displays the estimated religious composition of the world’s 20 most populous countries in 2010, using data from the Pew Research Center’s Global Religious Landscape. Hovering over the color legend highlights a specific religion across all bars, fading other segments and raising the selected stack to the front. Built with D3 v7, it uses `scaleOrdinal` with `schemeCategory10` for colors, `stack` for data aggregation, and `scaleBand`/`scaleLinear` for axes. The visualization also employs `flatRollup` for grouping and responsive layout via `observeResize`.

AI-generated description

Stacked 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.

MIT Licensed

Similar vizzes