Viewing a saved revision (read-only)
bbf43ff66b3543c698d83ddaa8f19f6f
Fork of Fork of Interactive Stacked Bar Chart
This stacked bar chart displays categorical data across groups, with each bar divided into colored, labeled segments. Built with D3.js v3, it uses `d3.layout.stack()` to compute the stacked series and SVG `rect` elements to render the bars. The visualization includes axis scales via `d3.scale.ordinal` and `d3.scale.linear`, and interactive hover effects that reveal tooltips through `d3.select` and mouse event listeners. The data is structured as an array of series, and the chart updates dynamically based on user interaction. It demonstrates a reusable, forkable approach to ordinal bar charts with stacked layers.
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.