Skip to main content
Public

Share visualization

Loading preview…

Activity-6 (question2.1)

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 (question2.1)

0
Kkandulasunny17@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024

This chart displays monthly sales figures for three product categories—Electronics, Clothing, and Home Goods—as a stacked horizontal bar chart. D3’s `scaleBand` positions months on the y-axis, while a `scaleLinear` maps cumulative sales values to x-axis lengths. Each bar segment’s width corresponds to category-specific revenue, with a legend and interactive tooltips revealing exact dollar amounts on hover. The example loads D3 v7 via UNPKG, reads CSV data asynchronously, and constructs the SVG visualization using `d3.axisLeft`, `d3.axisBottom`, `d3.stack`, and `scaleOrdinal` for color encoding.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.

Comments

Sign in to join the discussion.

MIT Licensed