Activity6_Question2
✓ Published0🌍 Public
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 descriptionMIT Licensed