Skip to content

Commit

Permalink
feat: add PercentageAxisUpToHundred convenience axis (#505)
Browse files Browse the repository at this point in the history
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_
  • Loading branch information
echeung-amzn authored Mar 22, 2024
1 parent b9176a5 commit 03ea80c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/common/widget/axis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ export const PercentageAxisFromZeroToHundred: YAxisProps = {
showUnits: false,
};

/**
* Y-Axis showing percentage, ranged up to 100.
*/
export const PercentageAxisUpToHundred: YAxisProps = {
max: 100,
label: "%",
showUnits: false,
};

/**
* Y-Axis showing time in milliseconds, ranged from 0.
*/
Expand Down

0 comments on commit 03ea80c

Please sign in to comment.