Fork of Activity_06_2
A stacked bar chart displays the percentage distribution of movie ratings across genres, with each bar segment representing a rating level and colors distinguishing them. The visualization uses d3.stack() to compute stacked series and d3.scaleOrdinal() for color mapping, rendering SVG rectangles via d3.selectAll(). Hovering triggers a tooltip showing the exact percentage for each rating segment. Data is loaded from a CSV file with rating percentages per genre, and the chart includes axes, labels, and a legend.
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%.