pie() — Pie chart

A round chart where each slice shows one group’s share of the whole.

pie(x, labels)

Key idea

Definition

a single group value
the total of all groups
the slice angle in degrees

In plain words

Cut a whole pie into slices, one slice per group. Just look to see who got the biggest piece — the widest slice wins.

Where you'd use it

Worked example 1

How many games sold in each type for Manic Mango: Sports 27,500, Strategy 11,500, Action 6,000, Shooter 3,500, Other 1,500. With one look, Sports grabs the biggest slice.

Frequently asked questions

Pie or bar chart?
Bars are easier to compare. Use a pie only for a few parts of one whole.