Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

1114StackBarChart

Public visualization

Viewing a saved revision (read-only)

a7c0b073a26d4116b95d78528a196665

1114StackBarChart

0 stars0🌍 Public
Vvivianaaai@qq.com
Last edited Nov 14, 2023
Created on Nov 14, 2023
Forked from StackBarChart

This stacked bar chart displays four months of fruit production data, with apples, bananas, cherries, and dates layered from bottom to top. The visualization uses d3.stack() to transform the input dataset into stacked series, then renders each category as a colored SVG rectangle within a group using a data join. Axes are generated with d3.axisLeft and d3.axisBottom, with the x-axis formatted as month-day labels via d3.timeFormat. The chart uses a linear scale for the y-axis and a band scale for the x-axis, with a categorical color scale applying the d3.schemeSet3 palette to distinguish fruit types.

AI-generated description

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

See also React Starter.