From af4c232d48e1861baa7c0401c1c667ac253c1c12 Mon Sep 17 00:00:00 2001 From: Dustin Breuer Date: Mon, 5 Feb 2024 20:19:07 +0100 Subject: [PATCH] Limit percentageDecimals to 20, the maximum value of Intl.NumberFormatOptions.minimumFractionDigits --- packages/mermaid/src/docs/syntax/pie.md | 2 +- packages/mermaid/src/schemas/config.schema.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mermaid/src/docs/syntax/pie.md b/packages/mermaid/src/docs/syntax/pie.md index e57a390c8f..e10ce4dab3 100644 --- a/packages/mermaid/src/docs/syntax/pie.md +++ b/packages/mermaid/src/docs/syntax/pie.md @@ -51,4 +51,4 @@ 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` | -| `percentageDecimals` | The number of decimal places to show in the percentage label, from 0 to 100. (v+) | `0` | +| `percentageDecimals` | The number of decimal places to show in the percentage label, from 0 to 20. (v+) | `0` | diff --git a/packages/mermaid/src/schemas/config.schema.yaml b/packages/mermaid/src/schemas/config.schema.yaml index 133f0e68a2..c299ef2867 100644 --- a/packages/mermaid/src/schemas/config.schema.yaml +++ b/packages/mermaid/src/schemas/config.schema.yaml @@ -879,7 +879,7 @@ $defs: # JSON Schema definition (maybe we should move these to a separate file) percentageDecimals: type: number minimum: 0 - maximum: 100 + maximum: 20 description: | The number of decimal places to show in the percentage label. default: 0