Changeset View
Changeset View
Standalone View
Standalone View
src/applications/fact/chart/PhabricatorFactChartFunction.php
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | if ($data) { | ||||
$map[$epoch] += $value; | $map[$epoch] += $value; | ||||
} | } | ||||
} | } | ||||
$this->map = $map; | $this->map = $map; | ||||
} | } | ||||
public function getDomain() { | public function getDomain() { | ||||
return array( | $min = head_key($this->map); | ||||
head_key($this->map), | $max = last_key($this->map); | ||||
last_key($this->map), | |||||
); | return new PhabricatorChartInterval($min, $max); | ||||
} | } | ||||
public function newInputValues(PhabricatorChartDataQuery $query) { | public function newInputValues(PhabricatorChartDataQuery $query) { | ||||
return array_keys($this->map); | return array_keys($this->map); | ||||
} | } | ||||
public function evaluateFunction(array $xv) { | public function evaluateFunction(array $xv) { | ||||
$map = $this->map; | $map = $this->map; | ||||
Show All 15 Lines |