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
Tue, May 13, 1:21 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
96711
Default Alt Text
PhabricatorMaxChartFunction.php (518 B)

Event Timeline