D3 Example
An interactive stacked bar chart visualizes the estimated religious composition of the world's 20 most populous countries in 2010, using data from the Pew Research Center. Hovering over a bar segment displays a tooltip with the specific religion, country, and population figure. The visualization also supports highlighting individual religions by hovering over the color legend, which fades other bars and re-renders the selected layer in the foreground. Built with D3.js, it employs the `d3.layout.stack` API for stacking, `d3.legend.color` for the interactive legend, and `d3-tip` for tooltips, all rendered as SVG with smooth animations.
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 bars for tool tips.
- Hover over the legend to highlight religions.
Data is from The Global Religious Landscape by Pew Research, generated using this processing script.
forked from <a href='http://bl.ocks.org/curran/'>curran</a>'s block: <a href='http://bl.ocks.org/curran/805413fb3b2efaada1ce'>Stacked Bars</a>
<!-- Start of SimpleHitCounter Code --> <div align="center"><a href="http://www.simplehitcounter.com" target="_blank"><img src="http://simplehitcounter.com/hit.php?uid=2100471&f=16777215&b=0" border="0" height="18" width="83" alt="web counter"></a></div> <!-- End of SimpleHitCounter Code -->