ICE - 7 Pie Chart
✓ Published0🌍 Public
This example shows the number of deaths by country using a pie chart, with each slice representing a country's share of total deaths from a CSV dataset of states. It displays a legend listing each country alongside its corresponding death count formatted with a "K" suffix (e.g., 1.2K). Built with D3 v5, the code fetches data from a GitHub Gist and uses `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` to compute and render the SVG slices and legend. The chart is drawn with an inner radius of zero and an outer radius of 175 pixels.
AI-generated descriptionMIT Licensed