Skip to main content
100%

Fork of Activity-6 Question-2

✓ Published0🌍 Public
Ssusarlasruthi2000@gmail.com
Last edited Apr 5, 2024
Created on Apr 5, 2024

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes