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
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

Comments

Sign in to join the discussion.

MIT Licensed