🌍 Public
Viewing a saved revision (read-only)
24e3f4287c3040c980000000209c666c
Fork of 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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.