Activity-9_Question-1
✓ Published0🌍 Public
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 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