Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of pie chart

Public visualization

Viewing a saved revision (read-only)

ba95e50f742048c19bcdeba81e2f8b48

Fork of pie chart

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