Skip to main content
100%

Activity6_Question2

✓ Published0🌍 Public
SSai Praveen Lokavarapu
Last edited Apr 5, 2025
Created on Apr 5, 2025
Forked from Hello VizHub

This stacked bar chart visualizes product category sales (Ornaments, Clothes, Electronics) across the years 2018-2021 from the CSV data file. The chart uses D3 v7's `d3.stack()` and `d3.scaleOrdinal` to layer the categorical segments, with SVG rectangles scaled via `d3.scaleBand` for the x-axis and `d3.scaleLinear` for the y-axis. Hovering a segment triggers a tooltip indicating the category and sales value, while a manual legend identifies color-keyed categories on the right side.

AI-generated description
MIT Licensed

Similar vizzes