fixup! feat(pie): adding outer border, text position options

This commit is contained in:
Billiam
2023-02-25 15:42:18 -06:00
parent a2855931d2
commit b079fb4710
6 changed files with 53 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ Drawing a pie chart is really simple in mermaid.
## Example
```mermaid-example
%%{init: {"pie": {"textPosition": 0.8, "outerBorderWidth": 5}} }%%
pie showData
title Key elements in Product X
"Calcium" : 42.96
@@ -57,6 +58,7 @@ pie showData
```
```mermaid
%%{init: {"pie": {"textPosition": 0.8, "outerBorderWidth": 5}} }%%
pie showData
title Key elements in Product X
"Calcium" : 42.96
@@ -64,3 +66,12 @@ pie showData
"Magnesium" : 10.01
"Iron" : 5
```
## Configuration
Possible pie diagram configuration parameters:
| Parameter | Description | Default value |
| ------------------ | ------------------------------------------------------------------------------------------------------------ | ------------- |
| `outerBorderWidth` | The border width of the pie diagram's outside circle | `2` |
| `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.5` |