Skip to main content
100%

D3 Example

✓ Published0🌍 Public
MMalicia
Last edited May 13, 2016
Created on May 13, 2016

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 description

Stacked 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.

<!-- Start of SimpleHitCounter Code --> <div align="center"><a href="http://www.simplehitcounter.com" target="_blank"><img src="http://simplehitcounter.com/hit.php?uid=1967777&f=16777215&b=0" border="0" height="18" width="83" alt="web counter"></a></div> <!-- End of SimpleHitCounter Code -->

forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/805413fb3b2efaada1ce'>Stacked Bars</a>

Similar vizzes