Skip to content

Commit 03ea80c

Browse files
author
Eugene Cheung
authored
feat: add PercentageAxisUpToHundred convenience axis (#505)
Useful for graphs where it'd go up to 100% but we want to see dips in it that might otherwise be difficult to see if the axis was 0 to 100 (like availability). --- _By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license_
1 parent b9176a5 commit 03ea80c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/common/widget/axis.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ export const PercentageAxisFromZeroToHundred: YAxisProps = {
1919
showUnits: false,
2020
};
2121

22+
/**
23+
* Y-Axis showing percentage, ranged up to 100.
24+
*/
25+
export const PercentageAxisUpToHundred: YAxisProps = {
26+
max: 100,
27+
label: "%",
28+
showUnits: false,
29+
};
30+
2231
/**
2332
* Y-Axis showing time in milliseconds, ranged from 0.
2433
*/

0 commit comments

Comments
 (0)