Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Activity6_Task2

Public visualization

Viewing a saved revision (read-only)

24e3f4287c3040c980000000209c666c

Fork of Activity6_Task2

0 stars1🌍 Public
Sshivakumarganji@my.unt.edu
Last edited Apr 5, 2024
Created on Apr 5, 2024
Forked from Activity6_Task2

This stacked horizontal bar chart displays the proportion of six food categories (Fruit, Vegetables, Meat, Dairy, Grains, Snacks) across rating bands from "Below 4" to "Above 8." Each category is a row of stacked colored segments, where segment length represents the percentage of ratings in that band. The visualization uses d3.stack() to compute cumulative values and d3.scaleOrdinal() for categorical colors. It renders via SVG with d3.axisBottom and d3.axisLeft, and includes interactive tooltips on mouseover showing exact percentage values. Data comes from a CSV file with pre-computed proportions.

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.