Change time window adjustment on Variant Report Component to rely on API calls
flaneuse opened this issue · 0 comments
flaneuse commented
Currently, the Situation Report Component relies on front-end filtering to fetch the data for all time, and then filter to the date range selected.
With the added min_date
and max_date
parameters added to the backend (outbreak-info/outbreak.api#54) we want to switch those to API calls.
- By default, calculate
min_date = today - 6 months
and execute that on page load. - When the user selects one of the preset buttons (
1 year
,all time
, etc.) -- execute a new API call to change the date. - If the user selects a date window by using the D3 brushing function to select a date, adjust the date to the range they selected and execute the new API call.
- For all date changes, ensure the date changes also adjust the routes, so when the user reloads the page, the API call correctly parses the
min_date
and/ormax_date
- Catch errors, as needed.