mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-24 22:35:58 +02:00
2012-02-07 Dario Rodriguez <dario.rodriguez@artica.es>
* include/graphs/functions_pchart.php: Fixed a problem charting lineal and area graph with negative values in static mode. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5505 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e80b4f0c92
commit
c43cafdf67
@ -1,3 +1,8 @@
|
|||||||
|
2012-02-07 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
|
* include/graphs/functions_pchart.php: Fixed a problem charting lineal
|
||||||
|
and area graph with negative values in static mode.
|
||||||
|
|
||||||
2012-02-07 Dario Rodriguez <dario.rodriguez@artica.es>
|
2012-02-07 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
* pandoradb.sql,
|
* pandoradb.sql,
|
||||||
|
@ -719,13 +719,21 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height,
|
|||||||
/* Define the chart area */
|
/* Define the chart area */
|
||||||
$myPicture->setGraphArea($chart_size, 5,$width - $water_mark_width,$height - $margin_bottom);
|
$myPicture->setGraphArea($chart_size, 5,$width - $water_mark_width,$height - $margin_bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Get minimun value to draw axis properly*/
|
||||||
|
$min_data = min(min($data));
|
||||||
|
|
||||||
|
$mode = SCALE_MODE_START0;
|
||||||
|
if ($min_data < 0) {
|
||||||
|
$mode = SCALE_MODE_FLOATING;
|
||||||
|
}
|
||||||
|
|
||||||
/* Draw the scale */
|
/* Draw the scale */
|
||||||
$scaleSettings = array("GridR"=>200,
|
$scaleSettings = array("GridR"=>200,
|
||||||
"GridG"=>200,
|
"GridG"=>200,
|
||||||
"GridB"=>200,
|
"GridB"=>200,
|
||||||
"DrawSubTicks"=>TRUE,
|
"DrawSubTicks"=>TRUE,
|
||||||
"CycleBackground"=>TRUE, "Mode"=>SCALE_MODE_START0, "LabelRotation" => 60, "XMargin" => 0, "MinDivHeight" => 20);
|
"CycleBackground"=>TRUE, "Mode" => $mode, "LabelRotation" => 60, "XMargin" => 0, "MinDivHeight" => 20);
|
||||||
$myPicture->drawScale($scaleSettings);
|
$myPicture->drawScale($scaleSettings);
|
||||||
|
|
||||||
/* Turn on shadow computing */
|
/* Turn on shadow computing */
|
||||||
@ -748,7 +756,7 @@ function pch_vertical_graph ($graph_type, $index, $data, $width, $height,
|
|||||||
"DisplayZeroValues"=>FALSE,
|
"DisplayZeroValues"=>FALSE,
|
||||||
"DisplayR"=>100,
|
"DisplayR"=>100,
|
||||||
"DisplayZeros"=> FALSE,
|
"DisplayZeros"=> FALSE,
|
||||||
"DisplayG"=>100,"DisplayB"=>100,"DisplayShadow"=>TRUE,"Surrounding"=>5,"AroundZero"=>FALSE);
|
"DisplayG"=>100,"DisplayB"=>100,"DisplayShadow"=>TRUE,"Surrounding"=>5,"AroundZero"=>TRUE);
|
||||||
|
|
||||||
|
|
||||||
switch($graph_type) {
|
switch($graph_type) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user