Activity6task2-q1
This stacked bar chart visualizes the distribution of score ranges across six school subjects, revealing how grade percentages vary by subject. Each horizontal bar represents a subject, segmented into seven color-coded score intervals from “below 40” to “above 90.” Built with D3 v7 and SVG, the chart uses `d3.stack()` to compute stacked segments and `d3.scaleOrdinal` for color mapping. Hovering over a segment displays a tooltip showing the exact percentage for that score range within the subject. The data comes from a CSV file containing percentage values that sum to 1 for each subject.
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%.