Fork of ICE - 7 Pie Chart Maanas Katta
✓ Published0🌍 Public
This pie chart visualizes the top 10 countries by deaths from air pollution in 2020, displaying each country’s death count both on the slices and in a legend. The chart uses d3.pie and d3.arc to generate the segments, with d3.scaleOrdinal assigning slice colors from a predefined array. Data is loaded as CSV from a remote gist, and death values are formatted in thousands (e.g., “54.3K”) using d3.format. The legend pairs colored rectangles with country names and values, all rendered as SVG elements within a fixed 960×500 canvas.
AI-generated descriptionMIT Licensed