🌍 Public
Viewing a saved revision (read-only)
a163f09e36254ae196c278d27f6315bb
Assisgment 2 -question 1
This example shows a pie chart of monthly sales totals, with each slice labeled by its month name directly on the chart. It loads CSV data from a GitHub Gist, aggregates the raw records by month using `d3.rollup` and `d3.sum`, then draws the chart with `d3.pie()` and `d3.arc()`. The SVG rendering uses `d3.scaleOrdinal` with `d3.schemeCategory10` for slice colors and places text labels at arc centroids.
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.