Skip to main content
100%

Fork of Fork of Fork of Fork of Interactive Stacked Bar Chart

✓ Published1🌍 Public
Aashok_sanjapu9
Last edited Apr 27, 2024
Created on Apr 26, 2024

This example shows estimated religious breakdowns for the 20 most populous countries in 2010, displaying population in millions on the x-axis and country names on the y-axis. The stacked bars draw on data from the Pew Research Global Religious Landscape and World Population dataset. Hovering over a color legend highlights the corresponding religion segment across all bars. The visualization is built with D3, using `scaleOrdinal` for colors, `scaleLinear` and `scaleBand` for axes, and `stack` for computing the stacked layout.

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.

//<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>

MIT Licensed

Similar vizzes