diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d02a6e279b..6b2be9e772 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2013-07-03 Miguel de Dios + + * include/graphs/fgraph.php: change the source code style to make + more easy the merges with the last branch. + + * include/graphs/functions_pchart.php: fixed the water mark for + pie graph as image. + + MERGED FROM THE BRANCH 4.0 + 2013-07-03 Miguel de Dios * mobile/operation/networkmap.php: fixed the scroll for browser diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 17eedef2e8..30e32448f0 100755 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -235,7 +235,7 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color, $legend, $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $series_type = array(), $chart_extra_data = array(), $yellow_threshold = 0, $red_threshold = 0, $adapt_key = '', $force_integer = false, $series_suffix_str = '', $menu = true) { - + setup_watermark($water_mark, $water_mark_file, $water_mark_url); // ATTENTION: The min size is 110x150 @@ -320,6 +320,7 @@ function stacked_line_graph($flash_chart, $chart_data, $width, $height, $color, return ''; } + if($flash_chart) { return flot_line_stacked_graph($chart_data, $width, $height, $color, $legend, $long_index, $homeurl, $unit, $water_mark_url); } @@ -350,7 +351,7 @@ function line_graph($flash_chart, $chart_data, $width, $height, $color, $legend, $water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $homeurl = '') { setup_watermark($water_mark, $water_mark_file, $water_mark_url); - + if (empty($chart_data)) { return ''; } diff --git a/pandora_console/include/graphs/functions_pchart.php b/pandora_console/include/graphs/functions_pchart.php index f8f3cd6909..3e2dcc8c05 100755 --- a/pandora_console/include/graphs/functions_pchart.php +++ b/pandora_console/include/graphs/functions_pchart.php @@ -397,6 +397,12 @@ function pch_pie_graph ($graph_type, $data_values, $legend_values, $width, $water_mark_height = 0; $water_mark_width = 0; if (!empty($water_mark)) { + if (is_array($water_mark)) { + if (!empty($water_mark['file'])) { + $water_mark = $water_mark['file']; + } + } + $size_water_mark = getimagesize($water_mark); $water_mark_height = $size_water_mark[1]; $water_mark_width = $size_water_mark[0]; @@ -414,7 +420,7 @@ function pch_pie_graph ($graph_type, $data_values, $legend_values, $width, $PieChart->setSliceColor($key, hex_2_rgb($colors[$key])); } } - + /* Draw an AA pie chart */ switch($graph_type) { case "pie2d":