Graph: Consider reverse sorted data points on isOutsideRange check (#30289)

This commit is contained in:
Joan López de la Franca Beltran 2021-01-14 18:44:48 +01:00 committed by GitHub
parent 2ef1b8653d
commit 860ff8cf7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,11 @@ export class DataProcessor {
const from = range.from;
if (last - from.valueOf() < -10000) {
series.isOutsideRange = true;
// If the data is in reverse order
const first = datapoints[0][1];
if (first - from.valueOf() < -10000) {
series.isOutsideRange = true;
}
}
}
return series;