Skip to main content
100%

Activity 6 task 2 Q2

✓ Published1🌍 Public
SSuneelKalva@my.unt.edu
Last edited Apr 6, 2025
Created on Apr 6, 2025
Forked from Hello VizHub

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
MIT Licensed

Similar vizzes