Activity6_Task2
This stacked bar chart shows the percentage distribution of five IMDb rating categories within six movie genres, revealing how genre influences ratings. The chart uses d3.stack() to create horizontal stacked bars, with colors from a d3.scaleOrdinal() scale distinguishing rating levels. Hovering over a bar segment triggers a tooltip displaying the precise percentage. Data comes from a CSV file, rendered as SVG, with axes and labels formatted using the d3.axisBottom and d3.axisLeft functions.
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%.