🌍 Public
Viewing a saved revision (read-only)
c5d41d2513824e30b9dbc84840b17331
Activity6_Task2
This visualization shows how movie ratings are distributed across six genres, with each genre’s stacked horizontal bar representing the percentage of films falling into five rating bands (below 5.0, 5.0–6.5, 6.5–7.5, 7.5–8.5, above 8.5), summing to 100%. The chart uses D3.js v7’s `d3.stack` to build the stacked bars, `d3.scaleOrdinal` for color mapping, and `d3.axisBottom`/`d3.axisLeft` for axes. Hovering over any segment triggers a tooltip that reveals the exact percentage for that rating band within the genre, using D3’s event handlers on SVG rectangles.
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.