Skip to main content
100%

Fork of Fork of Pie Chart

✓ Published0🌍 Public
Ssitaramchallapalli
Last edited Jul 2, 2022
Created on Jul 2, 2022
Forked from Fork of Pie Chart

This example visualizes the protein content in a cereal dataset as a pie chart, with each slice representing a cereal name and its corresponding protein grams. Using the d3.pie arc generator, the chart is rendered as SVG paths, while a custom legend displays each cereal name and its value. The code loads data from a GitHub gist via d3.csv, applies a categorical color scale from d3.scaleOrdinal, and formats numbers with d3.format. The visualization is built with D3 v5, using SVG for rendering, and includes custom styling for legend text.

AI-generated description
MIT Licensed

Similar vizzes