🌍 Public
Viewing a saved revision (read-only)
9ea1a5f1d9184d1f949d5bd0c4e86fea
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.