Skip to main content
100%

Fork of Fork of Pie Chart

✓ Published0🌍 Public
Eeravellisaimeghana
Last edited Mar 29, 2022
Created on Mar 29, 2022
Forked from Fork of Pie Chart

This example shows the amount of protein in grams present in various cereals as a pie chart, with a legend identifying each cereal and its corresponding protein value. The visualization loads a CSV dataset from a GitHub gist using `d3.csv` and renders the chart as SVG. It uses `d3.pie` to compute the arc angles, `d3.arc` to generate the path segments, and `d3.scaleOrdinal` to assign colors from a fixed palette. A separate legend group is built by appending rectangles and text labels for each data entry.

AI-generated description
MIT Licensed

Similar vizzes