Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pie chart-ice-7

Public visualization

Fork of Pie chart-ice-7

0 stars1🌍 Public
SSaiipriiya
Last edited Mar 12, 2023
Created on Mar 12, 2023

This visualization shows the top 10 countries by monthly farming output using a pie chart, with each slice labeled by country name and a legend displaying exact dollar amounts. The chart renders in SVG, fetching CSV data from a GitHub gist and parsing it with d3.csv. It uses d3.pie() to compute arc angles, d3.arc() for the path and label positioning via centroid, and d3.scaleOrdinal() to map a fixed color palette. Text elements use white fill per the CSS, though labels are overridden to black.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed