Activity 6_task 2
This stacked bar chart visualizes the impact of movie genre on IMDb ratings, with horizontal bars representing the proportion of films in each rating category per genre. The chart uses D3 v7 with the `d3.stack()` API to create stacked segments, `d3.scaleOrdinal()` for color encoding, and `d3.scaleBand()` for genre positioning. Interactive tooltips display precise rating percentages on hover via mouse events. Data comes from a local CSV file containing genre and rating distribution percentages.
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%.