Activity 6_Task 2
This visualization shows how movie ratings are distributed across six genres, using a stacked horizontal bar chart where each bar represents the percentage of films falling into five rating brackets from below 5.0 to above 8.5. Each genre’s bar is segmented into color-coded sections, with hover interactions revealing precise percentage values via tooltips. Built with D3 v7, the chart uses `d3.stack` for data transformation, `d3.scaleBand` for the genre axis, and `d3.scaleLinear` for the percentage scale. The data, loaded from a CSV file, is rendered as SVG, with axis labels and styling defined in external CSS.
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%.