Skip to main content
100%

Stacked Bar Chart

✓ Published0🌍 Public
Aanith462@gmail.com
Last edited Jul 22, 2023
Created on Jul 21, 2023
Forked from Hello VizHub

Stacked bar charts visualize the distribution of religious populations across fifteen countries. Each bar represents a country’s total population, segmented by religion, with a d3-tip tooltip revealing exact numbers on hover; hovering the color legend highlights a single religion across all countries. The D3.js code uses `d3.nest`, `d3.layout.stack`, and `d3.svg.axis` to stack and scale layers, with SVG animation-driven transitions. Data comes from an embedded CSV, rendered with an ordinal x-scale, linear y-axis, and category10 color scheme.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes