Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Interactive Stacked Bar Chart

Public visualization

Fork of Interactive Stacked Bar Chart

0 stars0🌍 Public
AAaron
Last edited Feb 4, 2026
Created on Feb 4, 2026

This interactive stacked bar chart displays the top 20 countries by population, broken down by religious affiliation in millions. Users can hover over the color legend to highlight the corresponding segment across all bars while fading others. Built with D3 v7, it uses `flatRollup`, `stack`, and `scaleBand` for data aggregation and layout, plus custom mouse events for filtering. The chart draws from a CSV of religion-by-country data and includes responsive axes and a categorical color scale.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed