Skip to content

Commit

Permalink
[#noissue] Fix chart format handler
Browse files Browse the repository at this point in the history
- Handle bytes and byte equally
  • Loading branch information
binDongKim committed Sep 4, 2024
1 parent 5a1dcbc commit 051f134
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web-frontend/src/main/v3/packages/utils/src/helper/charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const getEllipsisText = ({
};

const enum DATA_UNIT {
BYTES = 'bytes',
BYTE = 'byte',
COUNT = 'count',
PERCENT = 'percent',
Expand All @@ -67,6 +68,7 @@ const enum DATA_UNIT {

export const getFormat = (dataUnit: string) => {
switch (dataUnit) {
case DATA_UNIT.BYTES:
case DATA_UNIT.BYTE:
return (v: number) => abbreviateNumber(v, ['', 'K', 'M', 'G']);
case DATA_UNIT.COUNT:
Expand Down

0 comments on commit 051f134

Please sign in to comment.