I’ve set the time range start to be ‘-5s’ in the query so that I can ensure it is showing the latest figure and if it can’t get one it’ll show ‘No data’.
The problem
If I use the dashboard to analyse historic data the single stats don’t work because the ‘-5s’ in their query clashes with the new dashboard time window range. Of course if I set the stats time window start to be ‘v.timeRangeStart’ it will work when analysing historic data, but they don’t perform as I want for live data.
The question
What’s the best way around this, without having 2 different stat panels?
I’m getting something a little strange. If I restrict the ‘Relative time’ to anything less than 8s (the data is being reported every 1s) I get ‘No data’.
A ‘Relative time’ setting of >8s and it seems to work.
This panel was refreshed at 15:02:22 and pulled in the last() point 1 second earlier. So why would a ‘Relative time’ of 1s or 2s not work?
If I change the Relative time to 45 seconds, I get this (3 points, because that’s all there is over the past 45 seconds). Notice that the time selector remains at Last 15 minutes, but this value gets overridden by the relative time field.
Any value in the Relative time field of less than 15 seconds (the frequency at which readings are populated/stored in the database) means we will get No Data.