Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

task2 question

Public visualization

Viewing a saved revision (read-only)

d509149f91634a37a7a3261389047f11

task2 question

0 stars0🌍 Public
Llingaladineshteja23@gmail.com
Last edited Apr 6, 2024
Created on Apr 6, 2024
Forked from Hello VizHub

A stacked bar chart displays the percentage distribution of five rating levels across different vegetables, with each bar segment colored by rating category and totaling 100%. Hovering over a segment highlights it and reveals a tooltip with the exact percentage for that vegetable and rating level. The visualization uses D3 v7’s `d3.stack()`, `d3.scaleOrdinal`, `d3.scaleLinear`, and `d3.scaleBand` to encode data from a CSV file, rendering segments as SVG rectangles with mouse event handlers for interaction.

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.