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.