openremote icon indicating copy to clipboard operation
openremote copied to clipboard

Insights: create global time controls

Open DonWillems opened this issue 7 months ago • 1 comments

Further clarification and design needed.

User Story

As a user troubleshooting or monitoring assets with the Insights page I want to adjust the time period of all widgets at once, so I don't have to adjust the time selection for each chart and other widgets one by one, so that my workflow becomes much more efficient.

Description

Global time filter, and widgets can individually override the global time filter:

  • Full page time select is added to the header of an insights page (dashboard). In this time select you can set this/last time period. Or you can define a custom time period.
    • If you zoom in/out or pan within a chart that follows the global time filter, all widgets (that don't override the filter) follow <-- Is this realistic/feasible?
  • Widgets that are not concerned with a period, should show their latest datapoint from the end of the period (KPI, Gauge, Map, Image, Attribute). The KPI, Gauge, and Attribute widget need to show when their value was last updated.
  • In each widget there will be an option to override the global time filter and set their own time period.

Acceptance Criteria

  • [ ] 1. [Criteria]

Implementation Notes

[Relevant technical notes]

DonWillems avatar May 14 '25 13:05 DonWillems

One point we discussed here was about dynamically injecting new datapoints in a chart instead of recreating the whole widget, like https://echarts.apache.org/examples/en/editor.html?c=dynamic-data2 I came to the realization that this requires some thought on how to deal with downsampling (chart,kpi). When injecting datapoints live, it makes sense to remove oldest datapoints at the same rate, effectively creating a moving window.

However, when you have a LTTB sampled graph, and start adding/removing datapoints every update, you will alter the data representation. Example: Graph setting: Last 24 hours , LTTB, max 100 datapoints visible. Dashboard update : every second Data: every second

Now when first loading the dashboard you will see the last 24 hours, but after 100 seconds you will just see the last 100 seconds, non downsampled.

You could skip removing datapoints alltogether, but that means the graph will keep growing as long as the session continuous. Also, it will still contain a combination of downsampled and non-downsampled data.

An alternative would be that you keep downsampling and replace the whole dataset every update, but that effectively eliminates this whole feature.

I think it makes sense to make a seperate algorithm setting for charts that will make it use live values instead of downsampling.

Hackerberg43 avatar May 21 '25 08:05 Hackerberg43