Skip to content

Commit

Permalink
docs(gauge): Clarify enforceMinMax option (#3923)
Browse files Browse the repository at this point in the history
Currently enforceMinMax option works for single data series only.
Make sure clarifying the use of this option

Ref #3918
  • Loading branch information
netil authored and netil committed Dec 4, 2024
1 parent ab35355 commit 6ab71fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/config/Options/shape/gauge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ export default {
* @property {number} [gauge.expand.rate=0.98] Set expand rate.
* @property {number} [gauge.expand.duration=50] Set the expand transition time in milliseconds.
* @property {boolean} [gauge.enforceMinMax=false] Enforce to given min/max value.
* - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
* - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
* - **Note:** Only works for single data series.
* - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
* - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
* @property {number} [gauge.min=0] Set min value of the gauge.
* @property {number} [gauge.max=100] Set max value of the gauge.
* @property {number} [gauge.startingAngle=-1 * Math.PI / 2] Set starting angle where data draws.
Expand Down
5 changes: 3 additions & 2 deletions types/options.shape.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,9 @@ export interface GaugeOptions {

/**
* Enforce to given min/max value.
* - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
* - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
* **Note:** Only works for single data series.
* - When `gauge.min=50` and given value is `30`, gauge will render as empty value.
* - When `gauge.max=100` and given value is `120`, gauge will render till 100, not surpassing max value.
*/
enforceMinMax?: boolean;

Expand Down

0 comments on commit 6ab71fa

Please sign in to comment.