3 final class PhabricatorChartDataQuery
10 public function setMinimumValue($minimum_value) {
11 $this->minimumValue
= $minimum_value;
15 public function getMinimumValue() {
16 return $this->minimumValue
;
19 public function setMaximumValue($maximum_value) {
20 $this->maximumValue
= $maximum_value;
24 public function getMaximumValue() {
25 return $this->maximumValue
;
28 public function setLimit($limit) {
29 $this->limit
= $limit;
33 public function getLimit() {
37 public function selectInputValues(array $xv) {
40 $x_min = $this->getMinimumValue();
41 $x_max = $this->getMaximumValue();
42 $limit = $this->getLimit();
44 if ($x_min !== null) {
45 foreach ($xv as $key => $x) {
52 if ($x_max !== null) {
53 foreach ($xv as $key => $x) {
60 // If we have too many data points, throw away some of the data.
62 // TODO: This doesn't work especially well right now.
64 if ($limit !== null) {
66 if ($count > $limit) {
68 $every = ceil($count / $limit);
69 foreach ($xv as $key => $x) {
71 if (($ii %
$every) && ($ii != $count)) {
78 return array_values($xv);