Skip to main content
100%

Fork of piechart ic7

✓ Published0🌍 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
MIT Licensed

Similar vizzes