Activity6_Question2
This stacked bar chart displays the percentage of each rating level within different music genres, revealing how genre influences ratings. Each bar represents a genre, with segments colored by rating level, and hovering over a segment displays the precise percentage via a tooltip. The visualization uses d3.v7 with SVG rendering, employing `d3.stack()` for stacking, `d3.scaleOrdinal` for colors, and `d3.scaleBand` for the y-axis. Data is loaded from a local CSV file using `d3.csv`.
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%.