Activity6_Task2
This stacked bar chart shows the percentage distribution of five rating categories across six movie genres, revealing how genre influences audience reception. The chart uses stacked rectangles to represent proportions, with a color-coded legend and tooltips displaying precise percentages on hover. Built with D3.js v7, the visualization uses `d3.stack()` for data aggregation, `d3.scaleLinear` and `d3.scaleBand` for axes, and SVG rendering. The data comes from a CSV file with genre-based rating percentages, styled with custom CSS for interactive 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%.