Activity6Task2
This stacked bar chart shows the percentage distribution of five IMDb rating ranges across six movie genres, making genre effects on ratings visible. Each genre’s bar is segmented by rating category, with a legend identifying colors. Hovering over a segment displays its exact percentage via a tooltip. The visualization uses D3 v7 with `d3.stack` for data structuring, `d3.scaleLinear` and `d3.scaleBand` for axes, and SVG rendering. Data comes from a local CSV file with pre-aggregated proportions, and mouse events trigger the custom tooltip.
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%.