Skip to main content
100%

Responsive Stacked Bar Chart

✓ Published0🌍 Public
AAbdul Kareem
Last edited Apr 26, 2024
Created on Apr 26, 2024
Forked from Hello VizHub

This responsive stacked bar chart visualizes population projections across multiple years (1980–2050) for various countries. The SVG chart fills the entire viewport, with axes for countries and population values, and each bar segment represents a distinct time period. Built with D3 v6, it uses `d3.scaleBand`, `d3.scaleLinear`, `d3.stack`, and `d3.schemeCategory10` to compose the stacked bars, while `d3.csv` loads data from a remote JSON file. Hovering highlights bars in orange, and a tooltip displays details.

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