Activity6_Task2.1
✓ Published0🌍 Public
This example shows a stacked horizontal bar chart comparing the percentage distribution of vegetable ratings across six categories, from “below 4.0” to “above 8.0.” The visualization uses D3 v7’s `d3.stack()` to compute the stacked segments, with `d3.scaleOrdinal()` for color mapping and `d3.scaleBand()` for the vegetable categories. Each bar segment displays a tooltip on mouseover, showing the exact rating percentage. The chart loads data from a CSV file and renders as SVG, with axes and labels styled via external CSS.
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