Activity 6 Task 2(Interactive Stacked Bar Chart)
✓ Published1🌍 Public
This interactive stacked bar chart displays the estimated religious breakdown of the 20 most populous countries in 2010, with population measured in millions. Each country's horizontal bar is segmented by religion, and hovering over a legend item highlights that religion’s segments across all countries while dimming others. The visualization is built using D3.js, utilizing `scaleOrdinal`, `scaleLinear`, `scaleBand`, and the `stack` function to process the CSV data. The legend and chart implement mouseenter/mouseleave events to update the hovered color state, adjusting segment opacity and stroke accordingly.
AI-generated descriptionStacked bars showing estimated religion breakdown of the most populous 20 countries in 2010.
MIT Licensed