Merge branch '2992-Realtime-Graph-decimales' into 'develop'
Implemented limitation decimals in y-axis realtime graphs See merge request artica/pandorafms!1941 Former-commit-id: 0ca73da98323fa3880cccd96d12150228ce2dead
This commit is contained in:
commit
b9fd907933
|
@ -30,7 +30,7 @@
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
tickFormatter: function (value, axis) {
|
tickFormatter: function (value, axis) {
|
||||||
return shortNumber(value);
|
return shortNumber(roundToTwo(value)) ;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: {
|
series: {
|
||||||
|
@ -178,6 +178,9 @@
|
||||||
|
|
||||||
return number + " " + shorts[pos];
|
return number + " " + shorts[pos];
|
||||||
}
|
}
|
||||||
|
function roundToTwo(num) {
|
||||||
|
return +(Math.round(num + "e+2") + "e-2");
|
||||||
|
}
|
||||||
|
|
||||||
$('#graph').change(function() {
|
$('#graph').change(function() {
|
||||||
$('form#realgraph').submit();
|
$('form#realgraph').submit();
|
||||||
|
|
Loading…
Reference in New Issue