activity6_task 2
This stacked bar chart illustrates the percentage distribution of IMDb movie ratings across six genres, with each genre’s bars broken into five rating categories from “below 5.0” to “above 8.5.” The visualization uses a horizontal layout, with genres on the y-axis and the percentage scale on the x-axis, totaling 1. Hovering over any segment reveals a tooltip with the precise percentage for that rating category within the genre. The chart is rendered as SVG using D3 v7, leveraging `d3.stack`, `d3.scaleOrdinal`, and `d3.axisLeft`/`d3.axisBottom` to build the stacked bars and axes, with data loaded from a CSV file.
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%.