Skip to main content
100%

Activity6_Task2.1

✓ Published0🌍 Public
Ssumanthnaidu213@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024

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 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