Page MenuHomePhorge

PhabricatorShiftChartFunction.php
No OneTemporary

Size
468 B
Referenced Files
None
Subscribers
None

PhabricatorShiftChartFunction.php

<?php
final class PhabricatorShiftChartFunction
extends PhabricatorPureChartFunction {
const FUNCTIONKEY = 'shift';
protected function newArguments() {
return array(
$this->newArgument()
->setName('shift')
->setType('number'),
);
}
public function evaluateFunction(array $xv) {
$shift = $this->getArgument('shift');
$yv = array();
foreach ($xv as $x) {
$yv[] = $x + $shift;
}
return $yv;
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 7:58 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
107167
Default Alt Text
PhabricatorShiftChartFunction.php (468 B)

Event Timeline