Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of piechart ic7

Public visualization

Viewing a saved revision (read-only)

5855b360faab4aceb14ab5ae6c56941f

Fork of piechart ic7

0 stars0🌍 Public
Ssiddu7147
Last edited Mar 11, 2023
Created on Mar 11, 2023
Forked from piechart ic7

This example shows global fruit production by country for 2019, displaying each nation’s total value as a slice of a pie chart with an adjacent legend listing country names and corresponding quantities. The visualization uses D3 v5’s `pie` and `arc` generators to compute and draw the SVG paths, with `scaleOrdinal` mapping categories to a fixed color palette. Data is loaded asynchronously via `d3.csv` from a GitHub Gist, and the code formats the numeric values using `d3.format` before rendering the chart and legend inside an SVG container.

AI-generated description