Activity6_Question2
A stacked bar chart displays the percentage of five rating levels (Below 5.0, 5.0–6.5, 6.5–7.5, 7.5–8.5, Above 8.5) across six product categories, with each bar totaling 100%. The visualization highlights how rating distributions vary by category. Using d3.stack() and d3.scaleOrdinal for color encoding, the SVG renders horizontal bars via d3.scaleBand and d3.scaleLinear. Interactive tooltips appear on mouseover, showing exact percentage values computed with d3.format, using data from a CSV file.
AI-generated descriptionThe impact of category on category ratings
This stacked bar chart gives the percentage of each rating level within different categories. The aim is to show theimpact of category on category ratings. When the mousehovers overeach bar, you can see pop-ups of accurate percentage of each rating level within each category. Total percentage is 1, representing 100%.