Generate pie chart

Show category shares as sectors of a complete circle.

freeworks offlinenothing uploaded
ToolPie Chart Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Each nonnegative category value is divided by the total, multiplied by 360 degrees, and rendered as an arc or sector; labels are placed using the sector midpoint. A zero or negative total cannot produce meaningful proportions.

  • Angles represent parts of a whole, so values must define the full circle.

Worked example

Browser Market Share
Generate a pie chart of browser usage
Input
											Title: Browser Market Share
Segments: [{"label":"Chrome","value":65},{"label":"Safari","value":19},{"label":"Firefox","value":8},{"label":"Edge","value":5},{"label":"Other","value":3}]
Width: 400
Height: 400
Donut: false
										
Output

When to use this

Budgets, survey proportions, and traffic-source mixes use pie charts.

Edge cases

  • Negative values are not meaningful sectors.
  • A zero total makes every percentage undefined.
  • Many tiny categories become unreadable without grouping.