🌍 Public
Viewing a saved revision (read-only)
a5e368e0b62a4d82b1bf3398c2dbed1e
Activity 6 Question 2
A stacked bar chart displays quarterly sales revenue across seven product categories, with each bar segmented into four colored quarters from Q1 through Q4. The visualization uses D3 v7 to create an SVG with `d3.stack`, `d3.scaleBand`, `d3.scaleLinear`, and `d3.scaleOrdinal` for color encoding. Axes are rendered using `d3.axisBottom` and `d3.axisLeft`, with product category labels on the x-axis and sales revenue on the y-axis. The data is embedded directly in the script as an array of objects.
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.