Assignment 2 question1
✓ Published0🌍 Public
This example displays a pie chart of three sample categories with proportional slices, a legend, and axis labels. It renders as SVG using D3 v7, loading the library from UNPKG. The code uses `d3.pie()` for data layout, `d3.arc()` for path generation, `d3.scaleOrdinal` with `d3.schemeCategory10` for colors, and appends slices, legends, and labels via D3’s data join methods (`selectAll`, `enter`, `append`). The chart is built dynamically from static, hardcoded data.
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