Changes "This Month" view to Month-to-date for current month #491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Updates the "This Month" view to be called "Month to Date", and properly update
query
andprevQuery
values to reflect that.Fixes #391
I tried to get the same working for "Day to hour" or whatever it'd be called, but I was unable to get the query object to properly take a
DateTime
range structure, it only seems to function withDate.range()
- but I did leave all the progress I had there in the initial commit, if you know an easy way to make that conversion work.This functions in the way that Marko wanted/researched, where if today is 12/20/2020, the MTD view would compare data from 12/01/2020-12/20/2020 to 11/11/2020-11/30/2020. See screenshots below for the updated
query
andprevQuery
objects respectively, for months December and November, respectively.I didn't do the graph truncation here - but if it's wanted it's pretty trivial to add either from the data sent by Clickhouse or in React directly.
Tests
Changelog
Documentation
Screenshots