Fork of Interactive Stacked Bar Chart Prototype
This interactive stacked bar chart displays the estimated religious breakdown of the 20 most populous countries in 2010, based on data from the Pew Research Center. Hovering over a religion in the legend highlights that specific religion across all bars, while dimming others. Built with D3.js, it uses `scaleOrdinal` for color mapping, `stack` for data aggregation, and `flatRollup` to group by country. The `colorLegend` module handles the interactive highlighting with mouse events and opacity fading.
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.