Activity6
This stacked bar chart displays the percentage distribution of IMDb movie ratings across different genres, with each bar segment representing a rating level. The visualization uses d3.stack() to compute stacked data and d3.scaleOrdinal for color encoding, rendering as SVG rectangles. Hovering over any segment reveals precise percentage values via a custom HTML tooltip with mouseover events. The chart uses d3.axisBottom and d3.scaleBand for categorical genre comparison, with data sourced from a CSV file containing movie ratings by genre.
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%.