Fork2 of Pie chart
✓ Published0🌍 Public
This visualization displays the top 10 most populous countries in 2022 as a pie chart, with each slice labeled in thousands and a legend listing country names and population values. Using D3 v5, the code fetches CSV data via `d3.csv`, computes the pie layout with `d3.pie`, and draws SVG paths with `d3.arc`. Slice colors come from `d3.scaleOrdinal`, and text labels are placed using `arc.centroid`. The chart renders in an SVG canvas with a light yellow background and includes a manual legend built from the same data.
AI-generated descriptionMIT Licensed