Activity 6 task 2 Q2
This stacked bar chart shows the percentage breakdown of fruit categories (Apples, Oranges, Bananas, Berries) across three months, using horizontal bars segmented by color. The visualization uses d3.stack() to compute cumulative values, d3.scaleOrdinal with d3.schemeCategory10 for color encoding, and d3.scaleBand for the categorical y-axis. Rendered as SVG, the chart positions each segment via d3.scaleLinear for the x-axis, with data loaded from an inline array. The tooltip behavior mentioned in the README is not implemented in the provided JavaScript code.
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%.