Skip to main content
100%

Activity6_Question - 2

✓ Published0🌍 Public
NNitish Thotakura
Last edited Apr 3, 2025
Created on Apr 3, 2025
Forked from Activity6_Task - 2

A horizontal stacked bar chart displays global smartphone market share across six countries, with each bar segmented by manufacturer (Apple, Samsung, Xiaomi, Oppo, Vivo, Others) and encoded in color via `d3.scaleOrdinal`. Built with d3.v7 and SVG, the visualization uses `d3.stack()` to compute cumulative segment positions, `d3.scaleLinear` for the share axis, and `d3.scaleBand` for country grouping. Interactive tooltips, styled in CSS, reveal precise percentages on mouseover, while the data originates from the embedded `data.csv` file.

AI-generated description
MIT Licensed

Similar vizzes