Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie Chart by arefa patwary

Public visualization

Fork of Pie Chart by arefa patwary

0 stars0🌍 Public
AArefa Patwary
Last edited Mar 28, 2022
Created on Mar 28, 2022

This example visualizes the top 10 countries by deaths in 2020 from air pollution using a pie chart rendered with SVG. The chart uses d3.pie and d3.arc to compute and draw arc segments, with d3.scaleOrdinal assigning colors to each slice. Text labels display death counts in thousands, while a legend lists each country alongside its corresponding value. Data is loaded asynchronously from a CSV file using d3.csv, and d3.format is applied to abbreviate large numbers.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed