Mermaid for

Pie charts

Turn data into proportions anyone can read

Show proportions, distributions, and breakdowns in a simple, shareable format.

What is a pie chart?

A pie chart shows data as slices of a circle, with each slice sized by its share of the total. William Playfair introduced the format in 1801 in his *Statistical Breviary*, and it remains one of the most recognized charts for part-to-whole comparisons. Pie charts work best with a small number of categories. Beyond six or seven slices, a bar chart is usually easier to read.

In Mermaid, a pie chart takes a few lines: the pie keyword, an optional title, and one line per slice with a label and a positive number. Add showData to display the values alongside the legend.

What you can map
with a pie chart

Budget and resource allocation

Survey response distributions

Time spent across categories

Market share breakdowns

Test coverage or completion percentages

Incident type or error category distribution

Team or workload composition

Budget and resource allocation

Survey response distributions

Time spent across categories

Market share breakdowns

Test coverage or completion percentages

Incident type or error category distribution

Team or workload composition

Who uses pie charts
on Mermaid

Project Managers

Show how time, budget, or effort is distributed across workstreams in a format that lands in any presentation.

Business Analysts

Visualize a distribution or breakdown without building a chart in a separate tool.

Consultants

Add a quick data visual to a client report that’s easy to update when the numbers change.

Data Analysts

Communicate a simple distribution to a non-technical audience without pulling up a dashboard.

Startup Founders

Show investors how you’re allocating resources or where your users are coming from.

When a pie chart is
the right call

Fast, accurate, editable, and actionable.

Describe your idea and get a diagram you can refine, then share with your team instantly.

FAQ

Common questions about building pie charts in Mermaid.

FAQ Icon