Activity 6 task 2
This stacked bar chart visualizes the percentage distribution of book ratings across five genres, using data from a CSV file. Each bar represents a genre, segmented by rating ranges from "below 4.0" to "above 8.5", with a horizontal axis showing percentages. The visualization uses D3 v7's `d3.stack`, `d3.scaleOrdinal`, `d3.scaleLinear`, and `d3.scaleBand` APIs, rendering as SVG in a browser. Interactive tooltips display precise rating percentages per genre when hovering over bar segments, with opacity changes on mouseover. The chart includes axis labels, a title, and a color-coded legend for rating ranges.
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%.