diff options
author | Anton Tananaev <anton@traccar.org> | 2024-05-09 06:34:04 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-05-09 06:34:04 -0700 |
commit | f6d15a1a445a1abd18d89a803b8617957c6970b6 (patch) | |
tree | 681a11f23d8898e4e15c35309e9c3198825d476c /src | |
parent | 860e980c1744be0be95ff42b023bfa8be138ebee (diff) | |
download | trackermap-web-f6d15a1a445a1abd18d89a803b8617957c6970b6.tar.gz trackermap-web-f6d15a1a445a1abd18d89a803b8617957c6970b6.tar.bz2 trackermap-web-f6d15a1a445a1abd18d89a803b8617957c6970b6.zip |
Fix number formatting
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util/formatter.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/util/formatter.js b/src/common/util/formatter.js index 7b7fc96d..0463df2b 100644 --- a/src/common/util/formatter.js +++ b/src/common/util/formatter.js @@ -23,11 +23,11 @@ export const formatNumber = (value, precision = 1) => Number(value.toFixed(preci export const formatPercentage = (value) => `${value}%`; -export const formatTemperature = (value) => `${value}°C`; +export const formatTemperature = (value) => `${value.toFixed(1)}°C`; -export const formatVoltage = (value, t) => `${value} ${t('sharedVoltAbbreviation')}`; +export const formatVoltage = (value, t) => `${value.toFixed(2)} ${t('sharedVoltAbbreviation')}`; -export const formatConsumption = (value, t) => `${value} ${t('sharedLiterPerHourAbbreviation')}`; +export const formatConsumption = (value, t) => `${value.toFixed(2)} ${t('sharedLiterPerHourAbbreviation')}`; export const formatTime = (value, format, hours12) => { if (value) { |