Activity6_Q2(3)
This stacked bar chart shows how movie ratings are distributed across six genres, with each bar representing the percentage of films falling into rating levels from “Below 5.0” to “Above 8.5.” The visualization uses d3.stack and d3.scaleBand to structure the data, while d3.scaleOrdinal assigns colors from d3.schemeCategory10. Hovering over a bar segment triggers a tooltip displaying the exact percentage via d3.select and style opacity changes. The data comes from movie.csv, rendered as SVG elements with axes and labels styled through external CSS.
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%.