Antonio-RiveroMartnez commented on PR #27145:
URL: https://github.com/apache/superset/pull/27145#issuecomment-1956503254

   > > So, will give it the `DATEADD` a go vs `time_shift` to compute the 
ranges in the backend (Probably would need something for the `inherited`) and 
hopefully that would ease the path to further iterations when a more powerful 
version of the control make it out of experimental.
   > 
   > So, what is "inherited"? Could you explain the design proposal?
   
   # New Time Comparison control
   
   <!-- The main goal of this new control is to offer instant time comparison 
in some visualizations -->
   
   The main goal of this new control is to offer instant time comparison in 
some visualizations.
   
   ## What do we mean by instant time comparison and why offering it?
   
   Right now when using the existing time comparison function, both the period 
that the user wants to review, as well as the period prior, have to be selected 
as part of the date range and care needs to be taken to ensure that the correct 
date ranges and time grains have been selected. Additionally, it also leads to 
issues with charts that don’t use the time comparison function, as they are now 
totalling both the period to be reviewed as well as the comparison period.
   
   Due to this, we're introducing the instant time comparison as in the user 
doesn't need to build an specific query for the time comparison and deal with 
time ranges and grains.
   
   We're supporting this in two ways:
   
   1. Using new viz plugins entirely, like the **BigNumber with Time 
Comparison** one
   2. Injecting a new control in the control panel that existing visualizations 
can leverage
   
   Both ways would make use of the utils methods implemented in this Pull 
Request and both ways should be made available only behind the experimental 
feature flag.
   
   ## What options does this instant time comparison have and what do they do?
   
   **Inherited time range:** The time comparison range is driven by the 
timedelta in days within the time range of the selected filter.
   **Year:** Same period last Year
   **Month:** Same period last Month
   **Week:** Same period last week
   **Custom:** User enters a time range to use as comparison using the 
TimeFilter modal
   
   ## Conclusion
   
   We are not aiming to replace current time comparison function, we're just 
offering more usable and static time comparisons to users and presenting the 
compared data in a more explicit way to users. Advanced users would still make 
use of the current time comparison function.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to