Skip to main content
100%

Activity 5_Question 3

✓ Published0🌍 Public
Ppenujulilikhil01020@gmail.com
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

A stacked bar chart displays regional product sales across four regions, with each bar segmented by product category. The visualization uses D3 v7’s `d3.stack`, `d3.scaleBand`, `d3.scaleLinear`, and `d3.scaleOrdinal` to render SVG rectangles with color-coded segments per product. Data loads from a CSV file via `d3.csv` with `d3.autoType`, and axes are generated using `d3.axisBottom` and `d3.axisLeft`. A legend maps product names to their ordinal color range, annotating each segment’s contribution.

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

Similar vizzes