Pie chart diagrams
A pie chart (or a circle chart) is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. While it is named for its resemblance to a pie which has been sliced, there are variations on the way it can be presented. The earliest known pie chart is generally credited to William Playfairβs Statistical Breviary of 1801 -Wikipedia
Mermaid can render Pie Chart diagrams.
Syntax
Drawing a pie chart is really simple in mermaid.
- Start with piekeyword to begin the diagram- showDatato render the actual data values after the legend text. This is OPTIONAL
 
- Followed by titlekeyword and its value in string to give a title to the pie-chart. This is OPTIONAL
- Followed by dataSet. Pie slices will be ordered clockwise in the same order as the labels.
- labelfor a section in the pie diagram within- " "quotes.
- Followed by :colon as separator
- Followed by positive numeric value(supported up to two decimal places)
 
[pie] [showData] (OPTIONAL) [title] [titlevalue] (OPTIONAL) β[datakey1]β : [dataValue1] β[datakey2]β : [dataValue2] β[datakey3]β : [dataValue3] . .
Example
Configuration
Possible pie diagram configuration parameters:
| Parameter | Description | Default value | 
|---|---|---|
| textPosition | The axial position of the pie slice labels, from 0.0 at the center to 1.0 at the outside edge of the circle. | 0.75 |