Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change time window adjustment on Location Component to rely on API calls #627

Open
flaneuse opened this issue Feb 8, 2023 · 0 comments
Open
Labels

Comments

@flaneuse
Copy link
Collaborator

flaneuse commented Feb 8, 2023

Currently, the Location 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/or max_date
  • Catch errors, as needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant