🌍 Public
Viewing a saved revision (read-only)
83c9bca8504c48a487867fc31d7dd69e
Activity 8_task2
A 100% stacked horizontal bar chart shows the proportion of six food categories (Fruit, Vegetables, Meat, Dairy, Grains, Snacks) receiving ratings from "Below 4" to "Above 8" on a scale of 0 to 1. The visualization uses D3.js v7 with an SVG renderer, employing d3.stack() with keys for the rating columns and d3.scaleBand() for category placement. Tooltips display the exact percentage for each category-rating segment, while d3.axisBottom and a custom legend annotate the chart.
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.