Fork of Fork of Fork of Fork of ICE 7 Pie Chart
✓ Published0🌍 Public
This example visualizes the top 5 countries by reported deaths in 2020 as a pie chart rendered in SVG. Each slice is colored and labeled with the number of deaths, while a legend to the right lists country names and their corresponding totals. The code fetches CSV data from a GitHub gist, parses it with d3.csv, and uses d3.pie and d3.arc to generate the chart. Colors are assigned via d3.scaleOrdinal, and labels are positioned using arc.centroid. The page loads d3 v5 from unpkg and embeds the logic in a bundle.js file.
AI-generated descriptionMIT Licensed