🌍 Public
Viewing a saved revision (read-only)
d5ed786c4c30428e9eee3ebf013d1b04
Activity6_tak2.1
This stacked bar chart visualizes product sales across three categories, with each bar segment representing a product's sales contribution. The chart uses horizontal bars, with colors differentiating categories and a legend identifying each one. The visualization is rendered as an SVG using D3.js v7, employing the `d3.stack()` function to compose the stacked data structure, `d3.scaleLinear()` and `d3.scaleBand()` to set the scales, and `d3.scaleOrdinal()` for color encoding. Mouseover events log category sales amounts to the console, providing an interactive element.
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.