Activity6_Task2
This stacked bar chart visualizes the distribution of IMDb movie ratings across six genres, showing the proportion of films falling into five rating brackets per genre. Using D3.js v7, the chart renders as an SVG with horizontal bars, where each genre’s stacked segments represent rating percentages. The implementation employs `d3.stack`, `d3.scaleOrdinal`, and `d3.scaleBand` to structure the data, with interactive hover tooltips displaying exact percentages via `d3.select` events. Data is loaded from a CSV file, and the legend color-codes the rating categories for clarity.
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%.