🌍 Public
Viewing a saved revision (read-only)
5d020f64764b49df83a888c3b4b29331
barchat_7 lewis
This example shows the top 10 countries by deaths from air pollution in 2020 using a pie chart with a legend. It uses d3.pie and d3.arc to generate the chart segments, with d3.scaleOrdinal assigning colors and d3.format for tick labels. The data is fetched as CSV from a GitHub gist using d3.csv. The chart renders in SVG, with each slice labeled by its value in thousands and a legend listing countries alongside their corresponding death counts.
AI-generated description