Fork of piechart ic7
✓ Published0🌍 Public
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 descriptionMIT Licensed