diff --git a/pandora_console/extensions/realtime_graphs/realtime_graphs.js b/pandora_console/extensions/realtime_graphs/realtime_graphs.js index 34da7b1704..924331cafe 100644 --- a/pandora_console/extensions/realtime_graphs/realtime_graphs.js +++ b/pandora_console/extensions/realtime_graphs/realtime_graphs.js @@ -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();