Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Question2

Public visualization

Viewing a saved revision (read-only)

cdf672e2dc10418b9d8c9e9beb5f3125

Activity6_Question2

0 stars0🌍 Public
PPavanKumarRacharla@my.unt.edu
Last edited Apr 6, 2024
Created on Apr 5, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.