Activty8 Task2
✓ Published0🌍 Public
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 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