Viewing a saved revision (read-only)
13c3fb9818ac4038be69d49988a6ccad
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.