Activity6_Task2
This stacked bar chart shows how movie ratings are distributed across six genres, with each bar representing the proportion of films falling into five rating brackets. The visualization uses D3.js v7’s `d3.stack` and `d3.scaleOrdinal` to construct the bars, with `d3.scaleLinear` for the percentage axis and `d3.scaleBand` for the genre categories. Hovering over a segment triggers a custom tooltip via `d3.select` and event handlers, displaying the precise percentage for that rating bracket. Data comes from a CSV file and is rendered as SVG within the browser.
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%.