Mermaid for
Pie charts
Show proportions, distributions, and breakdowns in a simple, shareable format.
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.
Visualize a distribution or breakdown without building a chart in a separate tool.
Describe your idea and get a diagram you can refine, then share with your team instantly.
Common questions about building pie charts in Mermaid.