I’m plotting multiple variables on a Chart widget. The X axis is time. I have data from two variables that is posted a few seconds apart. When I look at the data in Devices, it shows the correct timestamps, with one value posted a few seconds after another one, but on the Chart, these two values are posted in the wrong order, with the earlier one plotted later than the first one.
The usename is wbphelps. The device is “Cat Door 4”.
I’ve uploaded 3 screen caps. In dashboard chart the value of “Beacon Sensor” is plotted in purple, and the value of “IR Sensor” is plotted in red. you can see the blue line for “Beacon Sensor” on the chart is after the red line for “IR Sensor”, but in the data for each of the 2 variables you can see that the timestamps for these data points are in the reverse order. The most recent for “Beacon Sensor” is at 11:06:23 and the last one for “IR Sensor” is at 11:06:24, one second later.
The order of these events tells me if Shadow is in or out, depending on which sensor he trips first…
Thanks for sharing the screenshots, they have been very useful.
I have been doing some tests on my side and I can see that the values have received correctly. However, under the settings previously set in the widget, I was not able to see the plot of the IR sensor as shown in the chart shared.
I still cannot get the display to be in the correct order. I changed Span for all of the variables to “set by dashboard”, reloaded the page, and it’s still the same. For example, here is the plot at around 4:53 this morning. it shows the IR event happening first, then the door opening, and then the Beacon. But the data shows this:
Greetings @wbp, please allow me to answer in behalf of my colleague Maria. Our widgets have a special behaviour: If the number of all your variables’ dots to be plotted overflows a threshold of 10000, Ubidots will draw an average of those dots and, as an average, you will not get the raw values of your series and also the timestamps of the plotted values will be linespaced.
From our help center article: should the variable combined dots count exceed 10,000 dots, Ubidots will resample the data, by averaging, every 5 minutes, 30 minutes, and so on, to ensure the limit is not exceeded. We implement this to avoid memory issues, imagine that you have in an hour time span 100k of dots, and you have three widgets that should plot this amount of data, you browser and PC simply will hang up and the user experience will be certainly affected. Said this, you have the below options to see properly your variables:
Select a shorter time span, in this way you will retrieve less values and your raw series will be plotted.
Create a chart that plots fewer variables, i.e, a chart with only the IR and Cat Door time series:
Here are 3 more screen captures, this time of the same chart, with the mouse “hovered” to show the data values. You will note that the blue Beacon Sensor line is after the red IR Sensor line in the chart, but when I hover the mouse you can see that the timestamps are in the opposite order. Clearly the plot is incorrect.
I decided to try creating a new chart with (most of) the same variables and set the time span to 3 hours. Now the events display in the correct sequence. I changed it back to 6 hours and they are still in sequence. So maybe the original chart was corrupted somehow?