Activity 6_Task 2_tutorial
This stacked bar chart visualizes the distribution of IMDb ratings across different movie genres. It shows the proportion of films falling into five rating brackets, from "below 5.0" to "above 8.5," with each genre's total bar summing to 100%. Hovering over a segment reveals the exact percentage for that rating category within the selected genre. The visualization is built with D3 v7, using the `d3.stack` function to create the stacked segments and `d3.scaleOrdinal` for color assignment. It reads data from a local CSV file and renders all elements as SVG. Interactive tooltips are implemented using mouse event handlers on each rectangle.
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%.