From b06e9a731a19560fb58b47d4b01dc7049f8105ef Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Tue, 29 Nov 2011 16:07:44 +0000 Subject: [PATCH] 2011-11-29 Juan Manuel Ramon * include/functions_graph.php include/graphs/fgraph.php: Fixed custom graphs exportation to PDF. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5205 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/include/functions_graph.php | 22 ++++++++++++++------- pandora_console/include/graphs/fgraph.php | 14 ++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 04f0ce716d..0f4192aee4 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -741,40 +741,48 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $ if ($only_image) { $flash_charts = false; } +<<<<<<< .mine + + if ($flash_charts){ + include_flash_chart_script(); + } + +======= if ($flash_charts){ include_flash_chart_script(); } +>>>>>>> .r5204 switch ($stacked) { case GRAPH_AREA: - $color = null; + $color = null; return area_graph($flash_charts, $graph_values, $width, $height, $color, $module_name_list, $long_index, "images/image_problem.opaque.png", "", "", $homeurl, $config['homedir'] . "/images/logo_vertical_water.png", - $config['fontpath'], $config['font_size'], "", $ttl); + $config['fontpath'], $config['font_size'], "", $ttl); break; default: - case GRAPH_STACKED_AREA: + case GRAPH_STACKED_AREA: $color = null; return stacked_area_graph($flash_charts, $graph_values, $width, $height, $color, $module_name_list, $long_index, "images/image_problem.opaque.png", "", "", $config['homedir'] . "/images/logo_vertical_water.png", - $config['fontpath'], $config['font_size'], "", $ttl); + $config['fontpath'], $config['font_size'], "", $ttl, $homeurl); break; - case GRAPH_LINE: + case GRAPH_LINE: $color = null; return line_graph($flash_charts, $graph_values, $width, $height, $color, $module_name_list, $long_index, "images/image_problem.opaque.png", "", "", $config['homedir'] . "/images/logo_vertical_water.png", - $config['fontpath'], $config['font_size'], "", $ttl); + $config['fontpath'], $config['font_size'], "", $ttl, $homeurl); break; case GRAPH_STACKED_LINE: $color = null; return stacked_line_graph($flash_charts, $graph_values, $width, $height, $color, $module_name_list, $long_index, "images/image_problem.opaque.png", "", "", $config['homedir'] . "/images/logo_vertical_water.png", - $config['fontpath'], $config['font_size'], "", $ttl); + $config['fontpath'], $config['font_size'], "", $ttl, $homeurl); break; } } diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 5d6aaed252..48d43e152c 100755 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -222,7 +222,7 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color, $legend, function stacked_area_graph($flash_chart, $chart_data, $width, $height, $color, $legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "", - $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1) { + $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $homeurl = '') { if (empty($chart_data)) { return ''; @@ -249,13 +249,13 @@ function stacked_area_graph($flash_chart, $chart_data, $width, $height, $color, $id_graph = serialize_in_temp($graph, null, $ttl); - return ""; + return ""; } } function stacked_line_graph($flash_chart, $chart_data, $width, $height, $color, $legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "", - $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1) { + $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $homeurl = '') { if (empty($chart_data)) { return ''; @@ -282,14 +282,14 @@ function stacked_line_graph($flash_chart, $chart_data, $width, $height, $color, $id_graph = serialize_in_temp($graph, null, $ttl); - return ""; + return ""; } } function line_graph($flash_chart, $chart_data, $width, $height, $color, $legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "", - $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1) { - + $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $homeurl = '') { + if (empty($chart_data)) { return ''; } @@ -312,7 +312,7 @@ function line_graph($flash_chart, $chart_data, $width, $height, $color, $legend, $id_graph = serialize_in_temp($graph, null, $ttl); - return ""; + return ""; } }