Activity6-Question2
✓ Published0🌍 Public
This stacked bar chart depicts the percentage distribution of chocolate ratings across five categories, from "below 5.0" to "above 8.5," for six chocolate brands. Each brand forms a horizontal bar with colored segments representing the proportion of ratings in each category, using a diverging color scheme. Built with D3 v7 and rendered as SVG, the visualization uses `d3.stack()` to generate the stacked data and `d3.scaleOrdinal` for colors, with interactivity via mouseover events that display exact percentages in a tooltip. The chart reads from the CSV file, with axes labeled "Percentage" and a manual legend positioned to the right.
AI-generated descriptionMIT Licensed