🌍 Public
Viewing a saved revision (read-only)
73b0608685034443bca92b04fbcbd66d
Pie Chart
This pie chart displays the top five countries by total reported COVID-19 cases, using a dataset from a GitHub-hosted CSV file. The visualization loads data with `d3.csv`, sorts it in descending order, and slices the first five entries. It renders slices using `d3.arc` and `d3.pie` within an SVG, with labels positioned via `label.centroid`. A categorical color scale from `d3.scaleOrdinal` distinguishes each country, while solid white strokes separate the segments.
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.