DV TASK-8(2)
This stacked bar chart shows the percentage distribution of IMDb movie ratings across six genres, from Documentary to Action. The visualization uses a horizontal stacked bar for each genre, with segments representing five rating categories, from "below 5.0" to "above 8.5", scaled to total 100%. Hovering over any segment reveals a tooltip with the precise percentage for that rating level within the genre. The chart is rendered in SVG using D3 v7, with data processed through `d3.stack()` and scales from `d3.scaleLinear()` and `d3.scaleBand()`. Colors are assigned via `d3.scaleOrdinal()`, and axis labels use the custom "Yanone Kaffeesatz" font from Google Fonts. Interactive tooltips are implemented with D3's event handlers (`mouseover`, `mousemove`, `mouseout`).
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%.