From 64b62edd907974ed5dfb88c2c339a6284fe7e7fd Mon Sep 17 00:00:00 2001 From: danielmaya Date: Fri, 9 Mar 2018 10:18:02 +0100 Subject: [PATCH] Fixed shorten axis units --- pandora_console/include/graphs/flot/pandora.flot.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 6175ef554b..9719f77642 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1928,7 +1928,12 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, var formatted = number_format(v, force_integer, "", short_data); } else { - var formatted = v; + // It is an integer + if(v - Math.floor(v) == 0){ + var formatted = number_format(v, force_integer, "", 2); + } else { + var formatted = v; + } } return '
'+formatted+'
';