Skip to main content
100%

Activity_6_Question 2.3

✓ Published0🌍 Public
Kkesava
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

A stacked bar chart displays regional product sales, with each bar segmented by product category (productA, productB, productC) and colored via a categorical scale. The visualization loads CSV data with d3.csv and d3.autoType, then uses d3.stack to compute the stacked series. d3.scaleBand maps regions to x positions, d3.scaleLinear maps sales values to y positions, and d3.axisBottom and d3.axisLeft render the axes. A legend groups color swatches and labels, while the SVG output is generated entirely in d3.v7.

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