D3 Example
This example visualizes the estimated religious composition of the top five most populous countries in 2010 using stacked bar charts. Each bar represents a country, with segments colored by religion and sized by population, based on data from a Pew Research report. The chart supports interactive highlighting: hovering over an entry in the color legend fades the background bars and re-renders only the selected religion’s segments in the foreground. Built with D3, the visualization uses `d3.nest` and `d3.layout.stack` for data processing, along with SVG axes, `d3.legend.color`, and `d3-tip` for tooltips.
AI-generated descriptionStacked bars showing estimated religion by top 5 countries in 2010. This is an example from the tutorial Splitting Charts. The data shown is from this report on The Global Religious Landscape from Pew Research, generated using this processing script.
- Draws from Stacked-to-Grouped Bars
- Tooltip logic draws from World City Explorer
forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/805413fb3b2efaada1ce'>Stacked Bars</a>