🌍 Public
Viewing a saved revision (read-only)
b0ae8000d861467faa05921ce053518f
ICE - 7 Pie Chart
This pie chart shows the top 10 countries by deaths in 2020 from air pollution, displaying each country’s death count as a labeled slice and an associated legend. The chart uses D3 v5’s `pie` function to compute arc data, `arc` for path generation, and `scaleOrdinal` to assign colors from a hardcoded array. Labels within slices are positioned using `arcGenerator.centroid`, while legends are built manually with appended `<rect>` and `<text>` elements. Data is fetched from a remote CSV via D3’s `csv` method.
AI-generated description