Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

ICE7-Pie Chart

Public visualization

ICE7-Pie Chart

0 stars1๐ŸŒ Public
KKolliTeja
Last edited Mar 27, 2022
Created on Mar 27, 2022

This example visualizes the top 10 countries by deaths from air pollution in 2020, using a pie chart with colored segments, each labeled with its value in thousands and accompanied by a legend showing country names and death counts. Built with D3 v5, the code fetches CSV data from a GitHub gist, uses `d3.pie` and `d3.arc` to generate the sectors, applies a color scale via `d3.scaleOrdinal`, and renders both the chart and interactive-free legend as SVG elements, with axes formatted using `d3.format`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed