Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Question2

Public visualization

Viewing a saved revision (read-only)

6ad4f1a2cd374c00ada181c3d8468d42

Activity6_Question2

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

This stacked horizontal bar chart shows the distribution of ratings for six food categories, from "Below 4" to "Above 8," with each bar segment representing the percentage of ratings in that range. Built with D3 v7, the visualization uses `d3.stack()` to compute the stacked segments, `d3.scaleLinear()` for the x-axis, and `d3.scaleBand()` for the y-axis categories. Hovering over a segment highlights it and displays a tooltip with the exact percentage, while the data is loaded from a local CSV file. The SVG rendering includes custom axis labels and a legend.

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.