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

How a team’s sprint hours are split across feature work, bug fixes, tech debt, and meetings.

A breakdown of support requests by type — bugs, feature requests, billing, and general questions.

How a quarterly budget is allocated across headcount, tools, marketing, and infrastructure.

Where new users are coming from — organic, paid, referral, and direct — for a given period.

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.

A pie chart shows how a whole is divided into parts, with each slice representing a proportion of the total. It’s the fastest way to communicate a distribution or breakdown visually.
When you want to show part-to-whole relationships and have a small number of categories. If you have many categories or need to show change over time, a bar or line chart works better.
Define your chart with a title and a list of labeled values. Mermaid calculates the proportions and renders the chart automatically.
Yes. Export it as PNG or SVG, or embed it with Mermaid’s plugins.
Yes. Edit the values in the text and the chart re-renders instantly. No rebuilding, no reformatting.
FAQ Icon