Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of ICE - 7 Pie Chart Maanas Katta

Public visualization

Fork of ICE - 7 Pie Chart Maanas Katta

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

This example displays a pie chart of the top 10 countries by deaths from air pollution in 2020, with each slice labeled with its value in thousands and accompanied by a legend. It loads CSV data via `d3.csv` from a GitHub gist and renders an SVG using D3 v5’s `pie` and `arc` generators. The chart uses `d3.scaleOrdinal` to assign colors, `d3.format` for tick labels, and appends textual labels positioned via `arc.centroid`. The legend includes colored rectangles and text annotations, all drawn with SVG elements.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed