🌍 Public
Viewing a saved revision (read-only)
411d91b9f16f49b689dd4126afa56b5f
Activity6_Task2_Question2
This visualization displays a stacked horizontal bar chart of product category reviews, showing the proportion of 1-to-5-star ratings within each category. The bars are segmented by rating subgroup and colored via a d3.scaleOrdinal with the d3.schemeSet2 palette, with a legend positioned to the right. The code loads CSV data from a GitHub raw URL, processes it with d3.stack for stacking, and renders SVG rectangles with d3.axisBottom and d3.axisLeft for scales. Interactive tooltips appear on mouseover, displaying the percentage share of each rating segment. The visualization uses d3.csv, d3.stack, and SVG element bindings via d3 joins.
AI-generated description