Merge pull request #4145 from Billiam/feature/move-pie-labels

Pie: Adding outer border, text position options
This commit is contained in:
Sidharth Vinod
2023-03-05 00:33:15 +05:30
committed by GitHub
16 changed files with 131 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ Drawing a pie chart is really simple in mermaid.
## Example
```mermaid-example
%%{init: {"pie": {"textPosition": 0.5}, "themeVariables": {"pieOuterStrokeWidth": "5px"}} }%%
pie showData
title Key elements in Product X
"Calcium" : 42.96
@@ -42,3 +43,11 @@ pie showData
"Magnesium" : 10.01
"Iron" : 5
```
## 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` |