Activity6_Task2
This example visualizes the percentage distribution of IMDb movie ratings across six genres using a stacked horizontal bar chart. The chart shows how rating categories, from below 5.0 to above 8.5, are proportionally represented within each genre. The visualization is built with D3 v7, using `d3.stack` to compute the stacked segments and `d3.scaleBand` and `d3.scaleLinear` for axes. Interactive tooltips appear on hover, displaying the exact percentage for each rating segment. The data comes from a CSV file containing genre and rating proportion values, rendered as SVG elements.
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%.