From 7eed20933954efcb53f98609726abd642f040c26 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 11 Sep 2018 11:37:11 +0200 Subject: [PATCH] fixed error size graph in dashboard --- pandora_console/include/graphs/flot/pandora.flot.js | 4 +++- pandora_console/include/graphs/functions_flot.php | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 7af352cd69..e3abe74681 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1673,7 +1673,9 @@ function pandoraFlotArea( graph_id, values, legend, // Re-calculate the graph height with the legend height if (dashboard || vconsole) { - var hDiff = $('#'+graph_id).height() - $('#legend_'+graph_id).height(); + $acum = 0; + if(dashboard) $acum = 35; + var hDiff = $('#'+graph_id).height() - $('#legend_'+graph_id).height() - $acum; if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ){ } else { diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 27b64fdde0..bf423d2267 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -132,9 +132,10 @@ function flot_area_graph ( $params['grid_color'] = '#C1C1C1'; break; } + $padding_vconsole = $params['dashboard'] ? 'padding: 1px 0px 10px 10px;' : ''; // Parent layer - $return = "
"; + $return = "
"; // Set some containers to legend, graph, timestamp tooltip, etc. if($params['show_legend']){ $return .= "

";