Viewing a saved revision (read-only)
cdf672e2dc10418b9d8c9e9beb5f3125
Activity6_Question2
This visualization displays the distribution of ice cream ratings across six categories, from "Below 4" to "Above 8," using a horizontal stacked bar chart. Each bar represents a flavor (Vanilla, Butterscotch, Chocolate, Strawberry, Butterpecan, Cookies n Cream), with segments colored by rating category and lengths proportional to the percentage of ratings received. The chart is built with D3 v7, using `d3.stack()` to create stacked data, `d3.scaleLinear` for the x-axis, and `d3.scaleBand` for the categorical y-axis. Mouseover interactions reveal exact percentages via a tooltip, while a legend on the right identifies each rating segment.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.