Activity6_Task2_q1
✓ Published0🌍 Public
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 descriptionMIT Licensed