Small fix when you have sparse data.

Just change smoothing window in recalculateSeries, i:i+factor should be here instead i:i+2.