Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Stacked-bar-example

Public visualization

Viewing a saved revision (read-only)

97c01def21e84adbad7be1b84dc7ef60

Stacked-bar-example

0 stars3🌍 Public
GGabriel Ing
Last edited Jan 30, 2025
Created on Jan 29, 2025
Forked from HTML Starter

This stacked bar chart displays the distribution of three subgroups across multiple categorical groups, with each bar segment colored distinctly to show proportional composition. The visualization uses D3 v7 to load CSV data via `d3.csv` from a GitHub-hosted dataset, then applies `d3.stack()` and `d3.scaleBand()` to structure and position the bars. Colored segments are rendered as SVG rectangles using `d3.scaleOrdinal` for color mapping, with axes generated through `d3.axisBottom` and `d3.axisLeft`.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.