Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie Chart

Public visualization

Fork of Pie Chart

0 stars0🌍 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

Comments

Sign in to join the discussion.

MIT Licensed