Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6 task 2 Q2

Public visualization

Viewing a saved revision (read-only)

aad65a68f5fd49e1b4b9a5dfbfe7ec5a

Activity 6 task 2 Q2

0 stars1🌍 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