🌍 Public
Viewing a saved revision (read-only)
ddc518ed459d4367bf8bd7f7e743e908
Activity 6_Task 2 Q3
This stacked bar chart displays clothing sales across five stores, breaking down revenue into jeans, t-shirts, and shirts. Using D3 v7, the code loads data from a CSV file and applies the `d3.stack()` function to generate segments, with an ordinal color scale distinguishing product categories. Horizontal bars are rendered as SVG rectangles scaled by `d3.scaleLinear` for the x-axis and `d3.scaleBand` for store names. Interactive tooltips appear on mouseover, showing precise sales figures for each category per store.
AI-generated descriptionA demonstration of how to start using D3 version 6.