🌍 Public
Viewing a saved revision (read-only)
6a97b90c66ed4569a71ff8dff914e39e
Activity 6 task 2 Q2
This example presents a stacked bar chart showing the sales distribution of four product categories (Electronics, Clothing, Furniture, Groceries) across four regions (North, South, East, West), with each bar segment colored by region and displaying a hover tooltip with the exact percentage. Built with D3.js v5 and rendered as an SVG, the visualization uses `d3.stack()` to create stacked series from the in-memory `salesData` array, `d3.scaleBand` for the categorical x-axis, and `d3.scaleLinear` for the percentage-based y-axis. A legend identifies regions, and both axes include descriptive labels.
AI-generated description