Activity 6-Task2
This stacked bar chart shows how movie ratings are distributed across six genres, with each bar segmented into five rating categories. The visualization reveals that documentaries and dramas have higher proportions of above-average ratings, while action films skew toward lower scores. Built with D3.js v7, the chart uses `d3.stack()` to create the stacked segments, `d3.scaleOrdinal()` for color mapping, and `d3.csv()` to load the data. Mouse interactions highlight individual segments and display exact percentages via a tooltip.
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%.
Comments
Sign in to join the discussion.