Skip to content

Commit

Permalink
Merge pull request #2204 from upalatucci/fix-metrics-charts
Browse files Browse the repository at this point in the history
CNV-45733: fix metrics yaml
  • Loading branch information
openshift-merge-bot[bot] authored Sep 29, 2024
2 parents da7789c + 04c0778 commit fe09ac6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/components/Charts/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ export const findNetworkMaxYValue = (
return Math.max(...dataArray?.map((data) => data?.y));
});
const maxY = Math.max(...(yValues || []));
return Number.isInteger(maxY) ? maxY : 0;

if (Number.isInteger(maxY)) return maxY;

const roundedMax = Math.round(maxY);

return isNaN(roundedMax) ? 0 : roundedMax;
};

export const getNetworkTickValues = (Ymax: number) => {
Expand Down

0 comments on commit fe09ac6

Please sign in to comment.