Activity6_q2.1
This stacked bar chart shows the percentage distribution of ratings for various cartoon shows, with each bar divided into five rating categories from "below 5.0" to "Above 9.0." The visualization highlights how ratings vary across shows like Ben 10, Pokémon, and Tom and Jerry, with a hover tooltip revealing exact percentages. Built with d3 v7, the chart uses `d3.stack()` to compute stacked segments, `d3.scaleLinear` for the percentage axis, and `d3.scaleBand` for the categorical genre labels. The SVG renders colored rectangles per rating segment, with mouseover events triggering a custom tooltip that displays the precise percentage per show and rating level.
AI-generated descriptionThe ratings of cartoon shows
This stacked bar chart gives the percentage of each rating level within different cartoon shows. The aim is to show the impact of genre on cartton show 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%.