🥧 Mermaid

Pie chart

Show proportions at a glance

What is a Pie chart?

A pie chart shows how a total breaks down into parts: budget allocation, market share, survey answers, time distribution. In Mermaid it takes four lines of text — perfect for docs and reports.

Live example

Mermaid code
pie showData
    title Cloud spend by service
    "Compute" : 42
    "Storage" : 23
    "Network" : 18
    "Databases" : 12
    "Other" : 5
Live example
42%23%18%12%5%Cloud spend by serviceCompute [42]Storage [23]Network [18]Databases [12]Other [5]

When to use it

Visualize budget or cost breakdowns in reports
Present survey results and market share
Show time or resource allocation per team

Basic syntax

.mmd
pie title Budget
    "Engineering" : 50
    "Marketing" : 30
    "Operations" : 20

Questions about this diagram

Can I show the actual values on the chart?

Yes — add showData after the pie keyword and Mermaid displays the value next to each label, alongside the percentage.

How many slices should a pie chart have?

Five to seven at most for readability. Group small categories into “Other” — you can always link to a detailed table.

Create your Pie chart now

Describe it in plain language — the AI writes the Mermaid code for you.

Open Mermaid Studio