🌍 Public
Viewing a saved revision (read-only)
e2aa5be972254f33920b6cefcfe3665e
activity 6_Task 2
This visualization shows the distribution of star ratings (1 to 5) for different sports, displayed as a stacked horizontal bar chart where each bar represents a sport and segments show the proportion of each rating. The data comes from a CSV file with ratings for six sports, and the chart uses D3 v7 with SVG rendering. The code builds the stacked layout using `d3.stack()`, scales data with `d3.scaleLinear` and `d3.scaleBand`, colors segments via `d3.scaleOrdinal`, and includes interactive tooltips on mouseover that display the exact percentage for each rating segment.
AI-generated description