Merge pull request #6651 from mermaid-js/6584-piechart-zero-negative-values

6584: prevent pie chart crash on zero or negative values
This commit is contained in:
Knut Sveidqvist
2025-08-08 09:52:16 +00:00
committed by GitHub
9 changed files with 128 additions and 29 deletions

View File

@@ -37,6 +37,11 @@ Drawing a pie chart is really simple in mermaid.
- Followed by `:` colon as separator
- Followed by `positive numeric value` (supported up to two decimal places)
**Note:**
> Pie chart values must be **positive numbers greater than zero**.\
> **Negative values are not allowed** and will result in an error.
\[pie] \[showData] (OPTIONAL)
\[title] \[titlevalue] (OPTIONAL)
"\[datakey1]" : \[dataValue1]