Fork of Pie Chart
✓ Published0🌍 Public
This example shows a pie chart of the populations of the ten most populous countries, with each slice labeled in a side legend. Data is loaded from a CSV file using `d3.csv`, sorted, and sliced before being passed to `d3.pie` and `d3.arc` to generate the SVG segments. The chart uses `d3.scaleOrdinal` with `schemeCategory10` for slice colors and appends legend groups with rectangles and text. Hovering over a slice logs its population value to the console.
AI-generated descriptionMIT Licensed