🌍 Public
Viewing a saved revision (read-only)
572e60f7b8884900926c12fa24b3bc06
Fork of Pie Chart
This visualization displays the protein content of various cereals as a pie chart, with each slice colored and labeled through an accompanying legend that shows both the cereal name and its protein value in grams. The code uses D3 v5’s `pie` and `arc` generators to compute and render the SVG paths, while `scaleOrdinal` assigns a categorical color palette. Data is loaded asynchronously from a CSV gist via `d3.csv`, and the legend values are formatted using `d3.format`. The chart is rendered as static SVG with no interactivity.
AI-generated description