Skip to main content
100%

task2

✓ Published0🌍 Public
Kkeerthanachinthalapally@gmail.com
Last edited Apr 15, 2024
Created on Apr 15, 2024
Forked from Hello VizHub

This example presents a stacked bar chart that visualizes the distribution of three product categories (Product A, Product B, and Product C) across four geographic regions: North, South, East, and West. The chart uses SVG rendering to display the bars, with each product assigned a distinct color from the `d3.scaleOrdinal` and `d3.schemeCategory10` color scale. The code utilizes `d3.stack()` with `d3.stackOrderNone` and `d3.stackOffsetNone` to compute the stacked segments from the hardcoded data. A legend is appended to identify each product category, and the chart dimensions are fixed at 600 by 400 pixels.

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