Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Pie Chart

Public visualization

Making a Pie Chart

0 stars3🌍 Public
BbeauMarko
Last edited Aug 25, 2020
Created on Aug 20, 2020
Forked from Let's Make a Face

This example shows a donut chart of income sources—Sales, Dividends, and Interest—with labeled slices and a custom color scale. It loads data from a CSV file, converts the amounts to thousands, and renders the chart as SVG. The code uses D3 v5 APIs including `d3.pie`, `d3.arc`, `scaleOrdinal`, and `csv` to compute slice angles, generate paths, and position labels via arc centroids.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed