Task2 of Activity6
This stacked bar chart depicts the distribution of IMDb movie ratings across six genres, showing the proportion of films within each rating category from "below 5.0" to "above 8.5". Each horizontal bar represents a genre, segmented into rating brackets with distinct colors, and hovering over a segment displays the exact percentage via a tooltip. Built with D3 v7, the visualization uses `d3.stack()` for data stacking, `d3.scaleOrdinal` for color mapping, and SVG rendering. Data is loaded from a CSV file, with axes labeled and a legend positioned on the right.
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%.