🌍 Public
Viewing a saved revision (read-only)
105573bfe16e451e9f045b6cfaa10c94
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.