Fork of ICE - 7 Pie Chart Maanas Katta
✓ Published0🌍 Public
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 descriptionMIT Licensed