Pie chart
Pie charts show how a whole divides into labelled parts. zombie-mermaid renders SVG wedges with a legend and, in ASCII, a proportional bar chart, with optional raw values via showData.
Source → render
One whole, split into labelled shares.
share.mmd
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15About this notation
Where pie charts come from, and how the syntax works.
Pie charts divide a total into proportional slices and are the simplest data chart Mermaid offers. Mermaid’s syntax starts with `pie`, an optional `showData` flag that prints each raw value in the legend, and an optional `title`, followed by one `"Label" : value` line per slice. Slice sizes are computed as a share of the sum of all values.
Read the full syntax reference in the Mermaid docs →Every example
Every Pie chart example, on its own page.
Show 20 more examples
Pie: Empty
Pie: Empty With Title
Pie: All Zero
Pie: Tall Legend
Pie: Wide Characters
Pie: Long Labels
Pie: showData Decimals
Pie: Two Even Slices
Pie: Accessibility Only
Pie: Label Edge Cases
Pie: Percentage Boundaries
Pie: Custom Accent
Pie: More Slices Than Bar Cells
Pie: Donut Hole
Pie: Text Position
Pie: Legend Left
Pie: Legend Top
Pie: Legend Bottom
Pie: Legend Center
Pie: Highlight Slice
Keep exploring