diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 04bc188d52..ec3ffe020f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2011-04-14 Miguel de Dios + + * include/graphs/functions_pchart.php: setted the xmargin to 0. + + * include/graphs/fgraph.php: in function "pie_graph" reduce to 8 the + portions for the pie. + + * include/functions_db.php: changed the call "debug" to "ui_debug". + 2011-04-14 Sergio Martin * include/graphs/functions_pchart.php diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 515aefe282..bd1537307b 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -2573,7 +2573,7 @@ function sql_error_handler ($errno, $errstr) { global $config; /* If debug is activated, this will also show the backtrace */ - if (debug ($errstr)) + if (ui_debug ($errstr)) return false; if (error_reporting () <= $errno) diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 670c75a683..850f0b63d3 100755 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -53,7 +53,7 @@ switch($graph_type) { $title = get_parameter('title'); $mode = get_parameter('mode', 1); - + gd_progress_bar ($width, $height, $progress, $title, $font, $out_of_lim_str, $out_of_lim_image, $mode); break; } @@ -289,8 +289,8 @@ function pie2d_graph($flash_chart, $chart_data, $width, $height, $others_str = " } function pie_graph($graph_type, $flash_chart, $chart_data, $width, $height, $others_str) { - // This library allows only 9 colors - $max_values = 9; + // This library allows only 8 colors + $max_values = 8; if(count($chart_data) > $max_values) { $chart_data_trunc = array(); @@ -300,6 +300,9 @@ function pie_graph($graph_type, $flash_chart, $chart_data, $width, $height, $oth $chart_data_trunc[$key] = $value; } else { + if (!isset($chart_data_trunc[$others_str])) { + $chart_data_trunc[$others_str] = 0; + } $chart_data_trunc[$others_str] += $value; } $n++; @@ -324,7 +327,7 @@ function pie_graph($graph_type, $flash_chart, $chart_data, $width, $height, $oth $graph['height'] = $height; $id_graph = serialize_in_temp($graph); - + switch($graph_type) { case "2d": return ""; diff --git a/pandora_console/include/graphs/functions_pchart.php b/pandora_console/include/graphs/functions_pchart.php index bab29afa9b..a37b460c9b 100755 --- a/pandora_console/include/graphs/functions_pchart.php +++ b/pandora_console/include/graphs/functions_pchart.php @@ -605,7 +605,7 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height, $rgb_c "GridG"=>200, "GridB"=>200, "DrawSubTicks"=>TRUE, - "CycleBackground"=>TRUE, "Mode"=>SCALE_MODE_START0, "LabelRotation" => 60); + "CycleBackground"=>TRUE, "Mode"=>SCALE_MODE_START0, "LabelRotation" => 60, "XMargin" => 0); $myPicture->drawScale($scaleSettings); /* Turn on shadow computing */