Example #1
0
 /**
  * Add annotations
  */
 protected function addAnnotations()
 {
     if ($this->demandedPace > 0) {
         $demandedPace = $this->PaceUnit->rawValue($this->demandedPace);
         if ($this->PaceUnit->isTimeFormat()) {
             $demandedPace *= 1000;
         }
         $this->Plot->addThreshold("y", round($demandedPace), 'rgb(180,0,0)');
         //$this->Plot->addAnnotation(count($Data)-1, round($demandedPace), 'Soll: '.$this->PaceUnit->format($this->demandedPace), -10, -7);
     }
     if ($this->achievedPace > 0) {
         $achievedPace = $this->PaceUnit->rawValue($this->achievedPace);
         if ($this->PaceUnit->isTimeFormat()) {
             $achievedPace *= 1000;
         }
         $this->Plot->addThreshold("y", round($achievedPace), 'rgb(0,180,0)');
         $this->Plot->addAnnotation(0, round($achievedPace), 'ø ' . $this->PaceUnit->format($this->achievedPace), -40, -7);
     }
 }