Commit cb04b7f4 by Torkel Ödegaard

Fixed issue with legend values when all values are negative and some are null, #1468

parent de94b48d
...@@ -86,17 +86,19 @@ function (_, kbn) { ...@@ -86,17 +86,19 @@ function (_, kbn) {
} }
} }
if (_.isNumber(currentValue)) { if (currentValue !== null) {
this.stats.total += currentValue; if (_.isNumber(currentValue)) {
this.allIsNull = false; this.stats.total += currentValue;
} this.allIsNull = false;
}
if (currentValue > this.stats.max) { if (currentValue > this.stats.max) {
this.stats.max = currentValue; this.stats.max = currentValue;
} }
if (currentValue < this.stats.min) { if (currentValue < this.stats.min) {
this.stats.min = currentValue; this.stats.min = currentValue;
}
} }
result.push([currentTime, currentValue]); result.push([currentTime, currentValue]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment