Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Task 2 Q3

Public visualization

Viewing a saved revision (read-only)

ed866e41d2fc4943b5ceb1c2524831d4

Activity 6_Task 2 Q3

0 stars0🌍 Public
Aakankshareddygorla@my.unt.edu
Last edited Oct 22, 2024
Created on Oct 21, 2024
Forked from Hello VizHub

This stacked bar chart displays clothing sales across five stores, breaking down revenue into jeans, t-shirts, and shirts. Using D3 v7, the code loads data from a CSV file and applies the `d3.stack()` function to generate segments, with an ordinal color scale distinguishing product categories. Horizontal bars are rendered as SVG rectangles scaled by `d3.scaleLinear` for the x-axis and `d3.scaleBand` for store names. Interactive tooltips appear on mouseover, showing precise sales figures for each category per store.

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.