Page MenuHomePhorge

PhabricatorMaxChartFunction.php
No OneTemporary

Size
518 B
Referenced Files
None
Subscribers
None

PhabricatorMaxChartFunction.php

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

File Metadata

Mime Type
text/x-php
Expires
Mon, Jul 7, 5:44 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
327850
Default Alt Text
PhabricatorMaxChartFunction.php (518 B)

Event Timeline