Skip to main content
100%

Fork of Pie Chart

✓ Published0🌍 Public
Nnithish-1999
Last edited Mar 28, 2022
Created on Mar 28, 2022
Forked from Pie Chart

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 description
MIT Licensed

Similar vizzes