diff --git a/services/forecast_service.go b/services/forecast_service.go index 0604dc06590b600b08e8a1e9310a848db5e63090..d2771edbced8cd2170feb8eef5d22f685ce02f3c 100644 --- a/services/forecast_service.go +++ b/services/forecast_service.go @@ -129,11 +129,28 @@ func forecast(ctx common.DawnCtx, gddReq models.GddRequest, plantdate time.Time, // check if the last value is closer than the current. if it is, then the last value is the one to return if dist > lastDist { out[keys[currentMatch]] = &models.Bins{ + // ui is hardcoded to accept 5 Bins: []models.Bin{ { Value: 1, Date: plantdate.AddDate(0, 0, i-1), }, + { + Value: 0, + Date: plantdate.AddDate(0, 0, i-2), + }, + { + Value: 0, + Date: plantdate.AddDate(0, 0, i-3), + }, + { + Value: 0, + Date: plantdate.AddDate(0, 0, i-4), + }, + { + Value: 0, + Date: plantdate.AddDate(0, 0, i-5), + }, }, } currentMatch += 1