Activity6_task2
This stacked bar chart visualizes the distribution of IMDB movie ratings across six genres, showing the percentage of films falling into five rating brackets from "below 5.0" to "above 8.5." Each horizontal bar represents a genre, with color-coded segments for each rating category. Hovering over a segment displays a tooltip with the precise percentage. Built with D3 v7, the visualization uses `d3.stack()` for data transformation, `d3.scaleOrdinal()` for color mapping, `d3.scaleBand()` and `d3.scaleLinear()` for axes, and SVG rendering with a custom tooltip for interactivity.
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%.