🌍 Public
Viewing a saved revision (read-only)
e33d7776fb3b4eaca0d56cf9ee22600f
Task 3 Question3
This stacked bar chart visualizes phone brand sales (Apple, Samsung, Xiaomi) across five countries, with each bar segment representing a brand's contribution to total sales. The chart uses D3.js v7 with SVG rendering, loading data from a CSV file. It employs `d3.scaleBand` for the categorical x-axis, `d3.scaleLinear` for the numeric y-axis, and `d3.stack` to compute stacked segments. Hover tooltips display exact sales figures per brand and country. A color-coded legend identifies each brand.
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.