activity8_task2
This stacked bar chart displays the distribution of IMDb movie ratings across different genres, showing the proportion of each rating category (from below 4.0 to above 7.5) within each genre. The chart uses d3.stack() to create the stacked segments, with d3.scaleBand for the categorical y-axis and d3.scaleLinear for the percentage x-axis. Hovering over any segment reveals an exact percentage value via a custom tooltip, using d3.select and event listeners. The data comes from a CSV file, and the visualization is rendered as SVG using d3.v7.
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%.