Skip to main content
100%

Assignment 2 question1

✓ Published0🌍 Public
BBhavana Sharma
Last edited Apr 9, 2024
Created on Apr 9, 2024
Forked from Hello VizHub

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