Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task 3 Question3

Public visualization

Viewing a saved revision (read-only)

e33d7776fb3b4eaca0d56cf9ee22600f

Task 3 Question3

0 stars0🌍 Public
Vvemurisuchitha@gmail.com
Last edited Apr 13, 2024
Created on Apr 13, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.