Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

barchat_7 lewis

Public visualization

Viewing a saved revision (read-only)

5d020f64764b49df83a888c3b4b29331

barchat_7 lewis

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

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