Time window
Last updated
Last updated
The dashboard time window defines the duration and aggregation method for retrieving time series or alarm data. Unless specifically configured to override it, the time window is applied to all time series and alarm widgets.
For a time series widget, ThingsBoard retrieves telemetry data with a timestamp that falls within the defined time window.
For an alarm widget, ThingsBoard retrieves alarms that were created within the specified time window based on their created time.
The time window can work in two modes:
In the real-time mode, widgets constantly receive updates from the server and automatically show you only the data that matches the time window for a current timestamp.
In the history mode, widgets receive data only during the initial load.
The data aggregation function can be used with time series data but is not suitable for alarms. Currently, there are five available aggregation functions: Min, Max, Average, Sum, and Count. The special function "None" is used to deactivate aggregation.
Data aggregation is beneficial when you want to avoid fetching all time-series data to the user interface and prefer pre-aggregating it at the database level. By utilizing aggregation functions, you can save network bandwidth and reduce the computational load on the client browser. It is recommended to use aggregation functions whenever possible, especially if you have a large number of raw values.
To access the time window editor, click on the upper right corner where the current time frame is specified. Example below.
This will open the following window:
The options Last and Interval will provide the user with pre-defined options for data ranges. Turning on the Advanced toggled allows the user to set a specific input in terms of days, hours, minutes, and seconds. Data aggregation, max values and the timezone can be edited with the available options in the system.
To access the history mode click on the History tab, this will provide the following window:
The history time window allows the user to select the options Last and Interval in the same fashion as the realtime window. Additionally, the user can select the option Time period to select a date range with time included.