Fork of question 2
This stacked bar chart visualizes the distribution of book ratings across six genres, showing the percentage of books falling into five rating categories from "Below 5.0" to "Above 8.5." Each horizontal bar represents a genre, segmented by rating category, and hovering reveals the exact percentage for each segment via a custom tooltip. The data is loaded from a CSV file and processed using d3.stack(), with d3.scaleBand for the genre axis and d3.scaleLinear for the percentage axis. Colors are assigned via d3.scaleOrdinal, and the SVG rendering includes a legend for the rating categories.
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%.