1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00

fix: make numbers in chart to locale string (#7084)

To get correct formatting to number, in our codebase we call
toLocaleString(). Added it also to this component.

From

![image
(20)](https://github.com/Unleash/unleash/assets/964450/f941a592-4b86-4b64-99c5-4e7e5d4ccaf2)

To 

![Screenshot from 2024-05-20
14-06-19](https://github.com/Unleash/unleash/assets/964450/abac4570-30be-4fa4-a6fd-24b3f70902e0)
This commit is contained in:
Jaanus Sellin 2024-05-20 14:27:53 +03:00 committed by GitHub
parent 17e340ab40
commit 3768331e9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,19 +112,23 @@ export const MetricsSummaryTooltip: VFC<{ tooltip: TooltipState | null }> = ({
/>
<InfoLine
iconChar={'▣ '}
title={`Total requests: ${
title={`Total requests: ${(
point.value.totalRequests ?? 0
}`}
).toLocaleString()}`}
color={'info'}
/>
<InfoLine
iconChar={'▲ '}
title={`Exposed: ${point.value.totalYes ?? 0}`}
title={`Exposed: ${(
point.value.totalYes ?? 0
).toLocaleString()}`}
color={'success'}
/>
<InfoLine
iconChar={'▼ '}
title={`Not exposed: ${point.value.totalNo ?? 0}`}
title={`Not exposed: ${(
point.value.totalNo ?? 0
).toLocaleString()}`}
color={'error'}
/>
<ConditionallyRender