2011-04-06 Sergio Martin <sergio.martin@artica.es>

* include/graphs/pChart/pData.class.php
	include/graphs/pChart/pDraw.class.php: Fixed avoid zero values 
	into area graphs and clean code



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4173 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2011-04-06 08:43:06 +00:00
parent e921281e59
commit 236086cb9e
3 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,9 @@
2011-04-06 Sergio Martin <sergio.martin@artica.es>
* include/graphs/pChart/pData.class.php
include/graphs/pChart/pDraw.class.php: Fixed avoid zero values
into area graphs and clean code
2011-04-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_fsgraph.php, include/functions_graph.php,
include/graphs/functions_utils.php, include/fgraph.php: cleaned source code
@ -11,7 +17,7 @@
* include/graphs/pChart/pDraw.class.php: fixed to set a color border when
the graphs haven't a external defined colour.
* include/graphs/fgraph.php: changed for pass the data to static image graph
generator.

View File

@ -348,7 +348,7 @@
$BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G;
$BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B;
if ( isset($this->Data["Series"][$Serie]) )
if (isset($this->Data["Series"][$Serie]) )
{
$OldR = $this->Data["Series"][$Serie]["Color"]["R"];
$OldG = $this->Data["Series"][$Serie]["Color"]["G"];

View File

@ -3050,7 +3050,7 @@
$DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0;
$Data = $this->DataSet->getData();
debugPrint($Data, '/tmp/logo');
list($XMargin,$XDivs) = $this->scaleGetXSettings();
foreach($Data["Series"] as $SerieName => $Serie)
{
@ -3689,7 +3689,6 @@
$R = $Serie["Color"]["R"];
$G = $Serie["Color"]["G"];
$B = $Serie["Color"]["B"];
debugPrint($Serie["Color"], true);
if (isset($Serie["Color"]["BorderR"]))
$BorderR = $Serie["Color"]["BorderR"];
else
@ -3732,14 +3731,16 @@
foreach($PosArray as $Key => $Y)
{
// Hack to avoid draw zero values
debugPrint((int)$DisplayZeros . " - " . $Serie["Data"][$Key]." - ".$lastKey, '/tmp/logo');
if(!$DisplayZeros && $Serie["Data"][$Key] == 0 && $lastKey == 0) {
debugPrint("HOLA", "/tmp/logo");
if(isset($Serie["Data"][$Key + 1])) {
$nextKey = $Serie["Data"][$Key + 1];
}
else {
$nextKey = -1;
}
if((!$DisplayZeros && $Serie["Data"][$Key] == 0 && $lastKey == 0 && $nextKey == 0 && $Key != 0)) {
$Y = VOID;
}
else {
//debugPrint("ADIOS", "/tmp/logo");
}
}
$lastKey = $Serie["Data"][$Key];
if ( $DisplayValues && $Serie["Data"][$Key] != VOID )