Skip to main content
100%

Fork of Pie chart

✓ Published0🌍 Public
MMalempatiSaranya
Last edited Jun 30, 2022
Created on Jun 30, 2022
Forked from Pie chart

A pie chart displays the top 10 countries by population in 2022, with each slice labeled in thousands and accompanied by a legend showing country names and values. The chart uses D3 v5 to load CSV data via `d3.csv`, compute slice angles with `d3.pie`, and generate SVG paths with `d3.arc`. A `d3.scaleOrdinal` maps population values to a preset color array. Text labels are positioned using the arc centroid, while the legend is built with appended rectangles and text elements.

AI-generated description
MIT Licensed

Similar vizzes