🌍 Public
Viewing a saved revision (read-only)
13fb044fc0a24ffba09fbe4dccfb60e2
Charan Fork of ICE - 7 Pie Chart
This example visualizes the top 10 most populated U.S. states as a pie chart, with each slice labeled with its population in thousands and accompanied by a legend showing state names and values. The chart is rendered as an SVG using D3 v5, with data fetched from a CSV hosted on GitHub. It employs D3’s `pie`, `arc`, and `scaleOrdinal` APIs to generate slices and assign colors, and uses `arc.centroid` to position population labels within each segment. The legend is built with appended `rect` and `text` elements.
AI-generated description