acccc
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed