Skip to main content
Public

Share visualization

Loading preview…

Activity 6 task 2 Q2

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Activity 6 task 2 Q2

1
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

Comments

Sign in to join the discussion.

MIT Licensed