Activity 6 Task 2
This stacked bar chart shows the proportion of ratings across six movie genres, with each bar divided into five rating brackets from below 5.0 to above 8.5. The visualization reveals how genres like Documentary skew toward higher ratings while Action tends toward lower ones. Using d3.stack() and d3.scaleBand(), the chart encodes data from a CSV file as SVG rectangles. Interactive tooltips appear on mouseover, displaying the precise percentage for each rating segment using d3.format() and event handlers.
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%.