Progress 18 for the dashboards

This commit is contained in:
Julio Cesar Laura
2011-10-31 22:31:16 -04:00
parent b9b5f67166
commit 5db373fd61
2 changed files with 6 additions and 6 deletions

View File

@@ -68,7 +68,7 @@ Array
case 'PREVIOUS_YEAR' : $this->centerLabel = 'Previous year'; break;
default : $this->centerLabel = '';break;
}
return $row[0];
return true;
}
function render ($width = 300) {

View File

@@ -141,8 +141,8 @@
imagefilledellipse($im, $cX, $cY, $dXRing, $dYRing, $bgcolor);
//drawing the red arc
if ( $this->redFrom > $this->maxValue ) $this->redFrom = $this->maxValue;
if ( $this->redTo > $this->maxValue ) $this->redTo = $this->maxValue;
if ( $this->redFrom > $this->maxValue ) $this->redFrom = $this->maxValue;
if ( $this->redTo > $this->maxValue ) $this->redTo = $this->maxValue;
if ( $this->yellowFrom > $this->maxValue ) $this->yellowFrom = $this->maxValue;
if ( $this->yellowTo > $this->maxValue ) $this->yellowTo = $this->maxValue;
if ( $this->greenFrom > $this->maxValue ) $this->greenFrom = $this->maxValue;
@@ -155,13 +155,13 @@
$greenFrom = $this->greenFrom/$this->maxValue*300 - 240;
$greenTo = $this->greenTo/$this->maxValue*300 - 240;
if ( $this->redFrom != $this->redTo && $this->redTo != $maxValue ) {
if ( $this->redFrom != $this->redTo || $this->redTo != $this->maxValue ) {
imagefilledarc ($im, $cX, $cY, $dXRingColor, $dYRingColor, $redFrom, $redTo, $redArc, IMG_ARC_PIE );
}
if ( $this->yellowFrom != $this->yellowTo && $this->yellowTo != $maxValue ) {
if ( $this->yellowFrom != $this->yellowTo || $this->yellowTo != $this->maxValue ) {
imagefilledarc ($im, $cX, $cY, $dXRingColor, $dYRingColor, $yellowFrom, $yellowTo, $yellowArc, IMG_ARC_PIE );
}
if ( $this->greenFrom != $this->greenTo && $this->greenTo != $maxValue ) {
if ( $this->greenFrom != $this->greenTo || $this->greenTo != $this->maxValue ) {
imagefilledarc ($im, $cX, $cY, $dXRingColor, $dYRingColor, $greenFrom, $greenTo, $greenArc, IMG_ARC_PIE );
}
imagefilledellipse($im, $cX, $cY, $dXRingCenter, $dYRingCenter, $bgcolor);