tutorial2
This stacked bar chart from the IMDb movie ratings dataset shows the percentage breakdown of rating categories within each genre, such as Documentary, Drama, and Action. It reveals how genres like Documentaries skew toward higher ratings while Action films cluster at lower scores. Built with D3 v7, the visualization uses `d3.stack()` and `d3.scaleOrdinal()` with a diverging color scheme. A custom tooltip tracks the mouse position via `event.pageX` and `event.pageY`, displaying the precise percentage for each segment on hover.
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%.