Activity6_Task2
This stacked bar chart shows the distribution of IMDb movie ratings across six genres, with each bar normalized to represent 100% of ratings within a genre across five rating brackets. The visualization uses d3.stack() to compute stacked segments and d3.scaleOrdinal for color encoding. Hovering over any segment triggers a tooltip displaying the precise percentage for that rating level using d3.format('.2f'). The SVG-based chart renders categorical genres on a band scale and percentages on a linear axis, with data sourced 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%.