Skip to main content
100%

Activity-9_Question-1

✓ Published0🌍 Public
Hharipadmavathim2023@gmail.com
Last edited Apr 21, 2024
Created on Apr 21, 2024
Forked from Hello VizHub

This example presents a donut-style pie chart visualizing the quantity of different fruits from a CSV dataset fetched via `d3.csv`. It uses D3 v5 to compute arc paths with `d3.pie()` and `d3.arc()`, rendering the chart as SVG. A categorical color scale via `d3.scaleOrdinal` and `d3.schemeCategory10` colors each fruit slice. The code also constructs a legend with colored rectangles and text labels, positioned to the right of the chart.

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