Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ICE - 7 Pie Chart

Public visualization

ICE - 7 Pie Chart

0 stars1🌍 Public
BBajiSharifPatan@my.unt.edu
Last edited Mar 27, 2022
Created on Mar 27, 2022

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

Comments

Sign in to join the discussion.

MIT Licensed