Fix "data points outside time range" when there is no datapoints and aggregate function is used

This commit is contained in:
Matvey Marinin
2017-07-14 14:38:39 +03:00
parent 411efc5784
commit 5a4f30712a

View File

@@ -103,6 +103,8 @@ function groupBy_perf(datapoints, interval, groupByCallback) {
let point_frame_ts = frame_ts;
let point;
if (datapoints.length > 0) {
for (let i=0; i < datapoints.length; i++) {
point = datapoints[i];
point_frame_ts = getPointTimeFrame(point[POINT_TIMESTAMP], ms_interval);
@@ -125,6 +127,8 @@ function groupBy_perf(datapoints, interval, groupByCallback) {
frame_value = groupByCallback(frame_values);
grouped_series.push([frame_value, frame_ts]);
}
return grouped_series;
}