🌍 Public
Viewing a saved revision (read-only)
ed866e41d2fc4943b5ceb1c2524831d4
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.