task2 question
A stacked bar chart displays the percentage distribution of five rating levels across different vegetables, with each bar segment colored by rating category and totaling 100%. Hovering over a segment highlights it and reveals a tooltip with the exact percentage for that vegetable and rating level. The visualization uses D3 v7’s `d3.stack()`, `d3.scaleOrdinal`, `d3.scaleLinear`, and `d3.scaleBand` to encode data from a CSV file, rendering segments as SVG rectangles with mouse event handlers for interaction.
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%.