Activity 6_Task2
A stacked bar chart displays the percentage distribution of IMDb movie ratings across six genres, using a divergent color scale for five rating categories from "below 5.0" to "above 8.5". Hovering over any segment reveals an exact percentage via a tooltip. Built with d3.v7, the chart uses `d3.stack()` for stacking, `d3.scaleBand()` for genres, and `d3.scaleLinear()` for percentages, with data from the provided CSV. The SVG render includes axis labels, a title, and interactive mouseover events.
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%.