Skip to main content
100%

Activty8 Task2

✓ Published0🌍 Public
HHarshithaAmbilpur
Last edited Jul 10, 2023
Created on Jul 10, 2023
Forked from Hello VizHub

This example shows the count of students from each major at UNT in a pie chart with a legend listing each major and its corresponding value. The pie chart uses D3’s `pie` and `arc` generators to create the slices, with `scaleOrdinal` assigning colors from a predefined array. Each slice is labeled with its value formatted using D3’s `format` function, and a separate legend group positions rectangles and text labels. The data is loaded asynchronously from a CSV URL using D3’s `csv` method, and the visualization is rendered as SVG.

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