🌍 Public
Viewing a saved revision (read-only)
8dd782ad25eb4f759f56eff70cbe50ce
piechart
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.