Activity6_Task2
This stacked bar chart visualizes the distribution of IMDb movie ratings across six genres, showing the proportion of films falling into rating brackets from below 5.0 to above 8.5. The chart uses a horizontal layout with genres on the y-axis and percentage on the x-axis, where each genre’s bar is segmented by rating category. Hovering over any segment displays a tooltip with the exact percentage. Built with D3 v7, the visualization uses `d3.stack()` to create the stacked data, `d3.scaleOrdinal` for color encoding, and SVG rendering. The data covers Documentary, Drama, Comedy, Romance, Animation, and Action genres, sourced from a local CSV file.
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%.