openflighthpc / flight-control

0 stars 0 forks source link

Don't show both actual and forecast datasets in charts when hovering on overlap date #49

Closed timalces closed 1 year ago

timalces commented 2 years ago

To give the illusion of 'actual' and 'forecast' datasets being one, line datasets on charts include an artificial overlap data point on the final date of actual costs (e.g. 3 or 4 days before today).

When hovering over this date, only the 'actual' datasets should be shown. But in the cumulative chart forecast datasets are also shown, and in the daily costs chart both 'remaining budget' and 'forecast remaining budget' are shown.

Screenshot from 2022-06-27 17-43-32

This appears to be due to a logic error in the JavaScript function overlapDateIndex - this looks for datasets called 'total' and 'forecast total', but these at some point were changed to be 'cycle total' and 'forecast cycle total'.