🌍 Public
Viewing a saved revision (read-only)
c5dbfec2375b4252a6e28fa9591df333
Fork of ICE 7 Pie chart
This example displays a pie chart of the top 10 countries by population in 2022, with each slice labeled with its population value in thousands and accompanied by a legend listing country names and corresponding figures. The chart uses D3 v5, specifically the `pie`, `arc`, and `scaleOrdinal` APIs to generate and color the slices, while the `arcGenerator.centroid` method positions the text labels within each segment. Data is loaded asynchronously from a CSV file fetched from a GitHub gist URL. The visualization is rendered as SVG, with sections and legends appended to the canvas.
AI-generated description