Skip to main content
100%

Fork of pie chart

✓ Published1🌍 Public
Nnitishsurneni@gmail.com
Last edited Apr 6, 2025
Created on Apr 6, 2025
Forked from area chart

A pie chart displays the GDP distribution of the top ten countries, with each slice proportionally sized and labeled with the country name, alongside a legend. The D3.js code (v7) uses `d3.pie()` to compute arc data and `d3.arc()` to generate SVG paths, with `d3.scaleOrdinal` assigning colors. A separate SVG legend lists countries with color swatches. The hardcoded dataset is embedded directly in the JavaScript.

AI-generated description
MIT Licensed

Similar vizzes