How to set custom timeframe (on Chart or Value Widget and other Functions)
How to set custom timeframe (on Chart or Value Widget and other Functions)
The Chart, Value Widget and Rules come with options to set a custom time range.
In addition, the Chart Widget comes with time range presets that can be overridden by a custom one. In this guide you will find a short introduction to the various options available.
Examples
- Rolling last 24 Hours:
24 hours ago
( or1 day ago
) tonow
- Rolling last Week:
1 week ago
(or7 days ago
) tonow
Relative Time Range Options
- 1 day ago
- 1 hour ago
- 7 days ago
- 1 week ago
- 1 month ago
- last year
Absolute Time Range Options
Resolution
On some Widgets, for example the Chart Widget, you find an additional parameter to specify the resolution in which the data is fetched from the database. This settings specifies the time between datapoints within the given time range.
Best Practices
The reason for this is that a high resolution also leads to significantly longer loading times, since the data must first be retrieved from the server. This can take much longer with higher resolution and also slow down the entire loading process. We therefore suggest the following:
Daily Trends with High Resolution
We recommend to use high resolution data (like resolutions within minutes, for example 5 minutes) only in combination with time frames that go back to maximum of 48 hours. So you could set up a chart for a high resolution trend for the last 24 hours with the following settings: 24 hours ago
to now
with resolution of 5 minutes
.
Weekly or Monthly Overviews
Once you have set up a chart with high resolution for the last 24 hours, you can duplicate that widget and set the time frame to a lower resolution with larger time frame, like 14 days ago
to now
with a resolution of 24 hours
, 12 hours
or 4 hours
.
24 hours
as the resolution. You might want to select "Bar Chart" as the visualisation type as this makes more sense for higher resolutions.Video
We have also recorded a video that guides you through the best practices.
Updated on: 15/02/2022
Thank you!