piechart
✓ Published0🌍 Public
A pie chart displays the expiry counts by country due to air pollution, with each slice labeled by its value in thousands. The chart uses D3 v5 to load CSV data from a GitHub repository, calculate pie arc paths with `d3.pie` and `d3.arc`, and color slices via `scaleOrdinal`. A legend lists each country with its corresponding value, and text labels are positioned using `arc.centroid`. The SVG renders at 960×500 pixels with explicit colors assigned to each section.
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