Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Fork of Fork of Pie Chart

Public visualization

Fork of Fork of Pie Chart

0 stars0๐ŸŒ 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

Comments

Sign in to join the discussion.

MIT Licensed