Skip to main content
100%

acccc

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

This stacked bar chart shows sales of three products (A, B, and C) across four regions (North, South, East, West). Each bar segments total regional sales by product using a color scale. The visualization uses `d3.stack()` to compute the stacked series, along with `d3.scaleBand()`, `d3.scaleLinear()`, and `d3.scaleOrdinal()`. It renders SVG rectangles with x- and y-axes generated via `d3.axisBottom()` and `d3.axisLeft()`. A legend identifies the product colors. Sample data is hardcoded in the script, and the chart is sized at 600×400 pixels with specified margins.

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