show more precision in insights UI

pull/7982/head
Thibault Duplessis 2021-01-22 09:46:17 +01:00
parent fe0d99e1d0
commit 07b77c628d
1 changed files with 2 additions and 2 deletions

View File

@ -4,8 +4,8 @@ var numeral = require('numeral');
function formatNumber(dt, n) {
if (dt === 'percent') n = n / 100;
var f;
if (dt === 'seconds') f = '0.0';
else if (dt === 'average') f = '0.0';
if (dt === 'seconds') f = '0.00';
else if (dt === 'average') f = '0.00';
else if (dt === 'percent') f = '0.0%';
else f = '0,0';
return numeral(n).format(f);