Fix additional point in past series

This commit is contained in:
emanuele-f 2019-09-20 18:46:12 +02:00
parent 907b260ece
commit d7632494dd
2 changed files with 2 additions and 2 deletions

View file

@ -136,7 +136,7 @@ res.max_points = options.max_num_points
if not isEmptyString(compare_backward) and compare_backward ~= "1Y" and (res.step ~= nil) then
local backward_sec = getZoomDuration(compare_backward)
local tstart_cmp = res.start - backward_sec
local tend_cmp = tstart_cmp + res.step * res.count
local tend_cmp = tstart_cmp + res.step * (res.count - 1)
-- Try to use the same aggregation as the original query
local res_cmp = performQuery(tstart_cmp, tend_cmp, true, {target_aggregation=res.source_aggregation})