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

fix: Most recent date filter needs to take other filters into account #1311

Merged
merged 5 commits into from
Jan 30, 2024

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Jan 19, 2024

Closes #1310
Closes #1317

The initial implementation of most recent date filter didn't take other filters into account – we were simply taking max date for a given dimension, even if such selection led to missing data.

This PR fixes this by querying max date taking other filters into account, to effectively take "most recent date with data for current filter selection".

It also enables this logic for TemporalOrdinalDimensions.

How to test

  1. Go to this link.
  2. Change chart type to a pie chart.
  3. Toggle "Use most recent" in the date filter.
  4. See that the selected date equals to 09.09.2021.
  5. Repeat the same process on INT.
  6. See that the chart has no observations. The date is equal to 09.09.2021, however in the background it was equal to 27.09.2021 (max date for the whole dataset, see this observations query).

Copy link

vercel bot commented Jan 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2024 1:48pm

@bprusinowski bprusinowski merged commit f74ab56 into main Jan 30, 2024
4 of 6 checks passed
@bprusinowski bprusinowski deleted the fix/most-recent-date-filter branch January 30, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug with "use most recent" option "latest" not selectable
1 participant