コード例 #1
0
 /**
  * @return \Runalyze\View\Plot\Series
  */
 protected function seriesForOriginalData()
 {
     $Series = new Series\Elevation($this->Context, true);
     $Series->setColor('#ccc');
     $Series->setLabel(__('Original data'));
     $this->updateLimits($Series->limits());
     return $Series;
 }
コード例 #2
0
ファイル: ElevationAlgorithms.php プロジェクト: 9x/Runalyze
 /**
  * Init data
  * @param \Runalyze\View\Activity\Context $context
  */
 protected function initData(Activity\Context $context)
 {
     $this->Context = $context;
     $this->addSeries(new Series\Elevation($context), 1, false);
     if ($context->route()->hasCorrectedElevations() && $context->route()->hasOriginalElevations()) {
         $OriginalSeries = new Series\Elevation($context, true);
         $OriginalSeries->setColor('#ccc');
         $OriginalSeries->setLabel(__('Original data'));
         $this->addSeries($OriginalSeries, 1, false);
     }
     $this->addSeries($this->seriesForThreshold(), 1, false);
     $this->addSeries($this->seriesForDouglasPeucker(), 1, false);
     foreach (array_keys($this->Plot->Data) as $key) {
         $this->Plot->Data[$key]['curvedLines'] = array('apply' => false);
     }
 }