Skip to main content
100%

Fork of Interactive Stacked Bar Chart Prototype

✓ Published0🌍 Public
AAkanksha
Last edited Apr 5, 2024
Created on Apr 4, 2024

This example shows stacked bars representing the estimated religious breakdown of the world’s 20 most populous countries in 2010, with each bar segment colored by religion. Hovering over a category in the color legend highlights that religion’s segments across all bars while fading others. The visualization uses D3’s `scaleOrdinal`, `stack`, and `flatRollup` to process data from the Pew Research Center into a horizontal stacked bar chart with responsive axes, while the custom legend and bars implement hover interactions via mouse events and opacity transitions.

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