Activity6_task2
This stacked bar chart shows how IMDb movie ratings are distributed across six genres, with each bar segment representing the percentage of films falling into a rating bracket. The chart uses d3.stack and d3.scaleBand to construct the visualization, with data loaded from a CSV file. Color-coded segments correspond to rating categories, and hovering over any bar segment reveals the exact percentage via a tooltip built with d3.select. The SVG rendering employs d3.axisBottom and d3.scaleOrdinal for the x-axis and color scheme.
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%.