Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3: Stack layout stacked bar chart

Public visualization

Viewing a saved revision (read-only)

9b31e591191e449e8f5f8a7df5bf9dd1

D3: Stack layout stacked bar chart

0 stars0🌍 Public
DDebaliena
Last edited May 23, 2022
Created on May 23, 2022
Forked from HTML Starter

This stacked bar chart uses D3’s `d3.stack` layout to divide five categories into layered segments for apples, oranges, and grapes. Each series is rendered as SVG `rect` elements within grouped `<g>` elements, with `d3.scaleBand` positioning bars along the x-axis and `d3.scaleLinear` mapping cumulative values to heights. Colors come from `d3.schemeCategory10`, and the chart reads the static dataset directly from the script.

AI-generated description

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

See also React Starter.