Skip to main content
100%

Activity-6_Question-2

✓ Published0🌍 Public
Aabdul.khader2899@gmail.com
Last edited Apr 6, 2024
Created on Apr 4, 2024
Forked from Activity-6_Task-2

This stacked bar chart shows the distribution of Walmart product ratings across six product categories, with each bar divided into five rating percentage segments from "below 5.0" through "above 8.5." The visualization uses d3.stack() to compute the stacked series and d3.scaleOrdinal with a five-color palette to distinguish rating bands. It renders SVG rectangles with d3.scaleLinear for the percentage x-axis and d3.scaleBand for the categorical y-axis, displaying the percentages formatted to two decimals. Interactive tooltips appear on mouseover, showing the exact rating percentage for each segment.

AI-generated description

Creating stacked bar chart using the Products data

MIT Licensed

Similar vizzes