Viewing a saved revision (read-only)
a1e6562d38d3498e96487b56bf14d452
Activity6_Question2
This stacked bar chart displays the distribution of chocolate ratings across five brands, showing the proportion of ratings in five percentage-based categories from “below 5.0” to “above 8.5.” The code uses d3.stack() to generate the stacked series and d3.scaleOrdinal for color mapping, with d3.axisBottom and d3.axisLeft for axes. Interactive tooltips appear on mouseover, showing the exact percentage per rating category. The data comes from a local CSV file loaded with d3.csv, and the visualization is rendered as SVG with a linear x-scale for percentages and a band scale for 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%.