From 58cb113d400964ead195719e4f0f968b61ec2222 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Mon, 8 Jul 2019 13:23:35 +0200 Subject: [PATCH] fixed error in pdf --- pandora_console/include/functions_graph.php | 2 +- pandora_console/include/graphs/flot/pandora.flot.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 72bc9b5c91..d04c2049a0 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2161,7 +2161,7 @@ function graphic_combined_module( $graph_values = $temp; if (!$params['vconsole']) { - $width = 1024; + $width = $width; $height = 500; } diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index f7af997508..f0976cb98f 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -2791,14 +2791,16 @@ function pandoraFlotArea( if (short_data) { formatted = number_format(v, force_integer, "", short_data); } else { - // It is an integer + // It is an integer. if (v - Math.floor(v) == 0) { formatted = number_format(v, force_integer, "", 2); } } - // Get only two decimals - formatted = round_with_decimals(formatted, 100); + // Get only two decimals. + if (typeof formatted != "string") { + formatted = Math.round(formatted * 100) / 100; + } return formatted; }