mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 14:29:25 +02:00
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:
@@ -12,5 +12,9 @@ entry Pie:
|
||||
;
|
||||
|
||||
PieSection:
|
||||
label=STRING ":" value=NUMBER EOL
|
||||
label=STRING ":" value=NUMBER_PIE EOL
|
||||
;
|
||||
|
||||
terminal FLOAT_PIE returns number: /-?[0-9]+\.[0-9]+(?!\.)/;
|
||||
terminal INT_PIE returns number: /-?(0|[1-9][0-9]*)(?!\.)/;
|
||||
terminal NUMBER_PIE returns number: FLOAT_PIE | INT_PIE;
|
Reference in New Issue
Block a user