Skip to main content
100%

ICE-7 Pie Chart

✓ Published0🌍 Public
Aabdhaseeeb
Last edited Mar 25, 2023
Created on Mar 24, 2023
Forked from D3 Starter

This example displays a pie chart ranking the top nine foods by protein content, distinguishing between vegetarian and non-vegetarian options. It uses D3 v5 APIs (`d3.pie`, `d3.arc`, `d3.scaleOrdinal`) to generate SVG paths, with a legend showing food names and protein values in grams. The data is loaded asynchronously from a CSV file via a Gist URL using D3's `csv` import, and formatted with `d3.format`.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes