Activity6_Task2
This stacked bar chart shows the percentage distribution of five rating categories across six product types, revealing how ratings vary by genre. The visualization uses D3 v7 with SVG rendering, employing `d3.stack()` to create stacked segments for each rating bucket, `d3.scaleLinear` for the percentage axis, and `d3.scaleBand` for categorical alignment. Hover interactions trigger tooltips displaying exact percentages via mouse events and HTML div elements. The data comes from a CSV file listing product types and their rating proportions, normalized so each row sums to 100%.
AI-generated descriptionThe impact of genre on movie ratings
This stacked bar chart gives the percentage of each rating level within different movie genres. The aim is to show the impact of genre on movie ratings. When the mouse hovers over each bar, you can see pop-ups of accurate percentage of each rating level within each genre. Total percentage is 1, representing 100%.