1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Fix handling of "null" domain values in Charts

Summary: Depends on D20487. If you `min(1, 2, null)`, you get `null`. We want `1`.

Test Plan: Viewed a "burnup for project X" chart where one dataseries had no datapoints. Saw a sensible domain selected automatically.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: yelirekim

Differential Revision: https://secure.phabricator.com/D20488
This commit is contained in:
epriestley 2019-04-30 06:49:28 -07:00
parent 146317f2c4
commit 10afe1f2b5

View file

@ -10,8 +10,12 @@ abstract class PhabricatorHigherOrderChartFunction
$domain = $function->getDomain();
if ($domain !== null) {
list($min, $max) = $domain;
$minv[] = $min;
$maxv[] = $max;
if ($min !== null) {
$minv[] = $min;
}
if ($max !== null) {
$maxv[] = $max;
}
}
}