activity6question2
This example shows how movie ratings vary across genres using stacked horizontal bars, where each bar segment represents the percentage of ratings falling into one of five rating brackets from below 5.0 to above 8.5. The visualization makes it easy to compare rating distributions across genres like Drama, Comedy, and Non-fictional works. Built with D3 v7, the chart uses d3.stack to compute the layered data and d3.scaleOrdinal for color encoding. Hovering over a segment triggers a tooltip showing the exact percentage for that genre and rating level, while the legend identifies each rating category.
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%.