Activity-6 Question-2
✓ Published11🌍 Public
This visualization shows the distribution of ratings for six vegetables, each broken into five percentage ranges. It uses D3 v7 to render a horizontal stacked bar chart as an SVG, with the vegetables on the y-axis and the percentage scale on the x-axis. The chart employs `d3.scaleLinear` and `d3.scaleBand` for scaling, `d3.stack` to aggregate data from the CSV file, and a custom tooltip that appears on mouseover to display the exact percentage for each rating category.
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