Implemented limitation decimals in y-axis realtime graphs

This commit is contained in:
manuel.montes 2018-11-07 13:57:47 +01:00
parent 9c143d1d00
commit a3f4bfaa3d
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,7 @@
},
yaxis: {
tickFormatter: function (value, axis) {
return shortNumber(value);
return shortNumber(roundToTwo(value)) ;
}
},
series: {
@ -178,6 +178,9 @@
return number + " " + shorts[pos];
}
function roundToTwo(num) {
return +(Math.round(num + "e+2") + "e-2");
}
$('#graph').change(function() {
$('form#realgraph').submit();