A pie chart is a circular statistical graphic divided into slices to illustrate numerical proportion. The arc length of each slice is proportional to the quantity it represents.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mermaid-js/mermaid/llms.txt
Use this file to discover all available pages before exploring further.
Basic example
Syntax
Drawing a pie chart is simple:- Start with
piekeyword - Optionally add
showDatato display values - Optionally add
titlewith a string - Add data pairs:
"label" : value
Pie chart values must be positive numbers greater than zero. Negative values are not allowed and will result in an error.
With data values
Show actual data values after legend text:Advanced configuration
Customize appearance with configuration:Configuration parameters
Configuration parameters
| Parameter | Description | Default |
|---|---|---|
textPosition | Axial position of labels (0.0 at center to 1.0 at edge) | 0.75 |