Skip to main content
100%

Activity 6 Task 2(Interactive Stacked Bar Chart)

✓ Published1🌍 Public
Mmaheshchowdaryponnaganti@my.unt.edu
Last edited Apr 10, 2024
Created on Apr 11, 2024

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 description

Stacked bars showing estimated religion breakdown of the most populous 20 countries in 2010.

MIT Licensed

Similar vizzes