Fork of Activity-6 Question-2
✓ Published0🌍 Public
This example presents a horizontal stacked bar chart showing the percentage distribution of vegetable ratings across six categories, from "below 4.0" to "above 8.0." The chart uses D3 v7’s `d3.stack()` and `d3.scaleBand()` to construct the layered bars, with `d3.scaleOrdinal()` assigning colors. Mouseover events trigger a custom tooltip displaying the exact percentage for each segment. Data loads from a local CSV file, and the visualization renders as SVG with axes labeled by vegetable type and percentage.
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.
MIT Licensed