Fork of Interactive Stacked Bar Chart
This example shows a horizontal stacked bar chart displaying the estimated population of the 20 most populous countries in 2010, broken down by religion. Hovering over the legend highlights the corresponding segment within each bar, dimming all others. The visualization uses data from the Pew Research Center's Global Religious Landscape report. The code leverages D3.js (v7) utilities such as `stack`, `flatRollup`, `scaleBand`, and `scaleOrdinal` to process and render the chart, with responsive axes handled by the `@curran/responsive-axes` library.
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.