Example #1
0
 /**
  * Init data
  * @param \Runalyze\Model\Trackdata $trackdata
  * @param string $key
  * @param boolean $fillGaps try to fill gaps (zero values)
  */
 protected function initData(Trackdata $trackdata, $key, $fillGaps = false)
 {
     if (!$trackdata->has($key)) {
         $this->Data = array();
         return;
     }
     if ($fillGaps) {
         $this->fillGaps($trackdata, $key);
     }
     $Collector = new DataCollector($trackdata, $key);
     $this->Data = $Collector->data();
     $this->XAxis = $Collector->xAxis();
 }
 /**
  * Get next step for plot data
  * @return bool 
  */
 protected function move()
 {
     parent::move();
     $this->LoopSwimdata->goToIndex($this->Loop->index());
 }
 /**
  * Construct collector
  * @param \Runalyze\Model\Trackdata\Object $trackdata
  * @throws \InvalidArgumentException
  */
 public function __construct(Trackdata $trackdata)
 {
     parent::__construct($trackdata, Trackdata::CADENCE);
 }
 /**
  * Get next step for plot data
  * @return bool 
  */
 protected function move()
 {
     parent::move();
     $this->LoopRoute->goToIndex($this->Loop->index());
 }