Activity6_Task2
This stacked bar chart shows the percentage distribution of movie ratings across six genres, revealing how genres like Documentary and Action differ in their rating profiles. Each bar segment represents a rating category from below 5.0 to above 8.5, with hover interactions displaying exact percentages via a tooltip. Built with d3.v7, the visualization uses d3.stack for data transformation, d3.scaleOrdinal for color mapping, and d3.scaleBand for categorical positioning. Data originates from a CSV file containing genre-specific rating proportions. SVG rendering handles the visualization, with axes generated through d3.axisBottom and d3.axisLeft.
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%.