🌍 Public
Viewing a saved revision (read-only)
a157b27f322441acbe97bdcc61f1dde4
Activity 6 Question 2
This example shows stacked bar charts of sales in dollars across three product categories—Electronics, Furniture, and Clothing—for the years 2018 through 2020. It uses D3 v7 with the `d3.stack` API to layer the series, `d3.scaleBand` for the yearly bars, and `d3.scaleLinear` for the y-axis. Hovering reveals a tooltip with the category and exact value, while a legend identifies each color from `d3.schemeCategory10`, as loaded from a local CSV file.
AI-generated description