You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/05/16 13:47:12 UTC

[GitHub] [incubator-superset] villebro opened a new pull request #7525: Add relative start param for time filters

villebro opened a new pull request #7525: Add relative start param for time filters
URL: https://github.com/apache/incubator-superset/pull/7525
 
 
   ### CATEGORY
   
   - [ ] Bug Fix
   - [x] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   #6721 introduced the possibility to use time filters that end right now as opposed to midnight. However, this also made the start date reference the current time, leading to a moving window. While this might be fine for some use cases eg. line graphs with fine granularity, the full start day is often preferred in bar charts and similar; otherwise the start day will start dropping observations, as the day progresses. This PR introduces a new parameter `DEFAULT_RELATIVE_START_TIME`, which defaults to `today`.
   
   ### BEFORE
   As can be seen below, when setting `DEFAULT_RELATIVE_END_TIME = 'now'`, the start date starts to drop off observations prior to the current time.
   <img width="894" alt="Screenshot 2019-05-16 at 13 57 03" src="https://user-images.githubusercontent.com/33317356/57857696-5600d280-77f8-11e9-925a-ac8c3832a5a7.png">
   
   ### AFTER
   When setting `DEFAULT_RELATIVE_START_TIME = 'today'` and `DEFAULT_RELATIVE_END_TIME = 'now'`, the start date starts at midnight, while the end date is relative to the current time.
   <img width="895" alt="Screenshot 2019-05-16 at 16 19 42" src="https://user-images.githubusercontent.com/33317356/57857753-6e70ed00-77f8-11e9-9ca6-53a1dfc414c7.png">
   
   ### TEST PLAN
   Tested to work in practice.
   
   ### REVIEWERS
   @agrawaldevesh as this extends your original PR, I would be interested in hearing your thoughts on this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org