2013-06-20 Miguel de Dios <miguel.dedios@artica.es>
* include/graphs/functions_pchart.php: fixed the graphs with all values in negative Y axis. Now it shows correct. Fixes: #2302 MERGED FROM THE BRANCH PANDORA_4.0 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8367 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
5a612bcfbe
commit
b5904ecbcc
|
@ -1,3 +1,12 @@
|
|||
2013-06-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/graphs/functions_pchart.php: fixed the graphs with all
|
||||
values in negative Y axis. Now it shows correct.
|
||||
|
||||
Fixes: #2302
|
||||
|
||||
MERGED FROM THE BRANCH PANDORA_4.0
|
||||
|
||||
2013-06-20 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/graphs/fgraph.php, include/graphs/functions_pchart.php:
|
||||
|
|
|
@ -789,11 +789,17 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height,
|
|||
/*Get minimun value to draw axis properly*/
|
||||
$min_data = min(min($data));
|
||||
|
||||
$ManualScale = array();
|
||||
$mode = SCALE_MODE_START0;
|
||||
if ($min_data < 0) {
|
||||
$mode = SCALE_MODE_FLOATING;
|
||||
}
|
||||
|
||||
if ($max_data < 0) {
|
||||
$ManualScale = array(0 => array("Min" => $min_data, "Max" => 0));
|
||||
$mode = SCALE_MODE_MANUAL;
|
||||
}
|
||||
|
||||
/* Draw the scale */
|
||||
$scaleSettings = array("GridR"=>200,
|
||||
"GridG"=>200,
|
||||
|
@ -801,6 +807,7 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height,
|
|||
"DrawSubTicks"=>TRUE,
|
||||
"CycleBackground"=>TRUE,
|
||||
"Mode" => $mode,
|
||||
"ManualScale" => $ManualScale,
|
||||
"LabelRotation" => 40,
|
||||
"XMargin" => 0,
|
||||
"MinDivHeight" => 20,
|
||||
|
|
Loading…
Reference in New Issue