🌍 Public
Viewing a saved revision (read-only)
daacb04e67b34cf994de23c9b1158214
Activity6_Task2_q1
This stacked bar chart compares smartphone brand sales for Apple, Samsung, and Xiaomi across seven countries, with each bar segment representing a brand’s contribution to total sales. Hovering over a segment reveals a tooltip with the exact brand, sales figure, and country. The visualization uses d3.csv to load the dataset, d3.stack() to aggregate values, and d3.scaleBand for the x-axis. Color-coded segments follow an ordinal scale, while an SVG 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.