🌍 Public
Viewing a saved revision (read-only)
601e959453a54ffab6958fdd52f8bf3e
ICE7 - Pie Chart_RK
This pie chart visualizes the top 10 countries’ deaths from air pollution in 2020, with each slice labeled in thousands and a corresponding legend listing country names and values. The chart uses d3.pie() to compute arc angles and d3.arc() for path geometry, with d3.scaleOrdinal() mapping slice colors. Data is loaded asynchronously from a CSV via d3.csv. Text labels are positioned using arcGenerator.centroid(d), and the SVG rendering includes manually appended legend rectangles and text elements. The implementation relies on D3 v5.
AI-generated description