Adding chart to track value over time fails

Running StreamSheets 2.0 in Chrome 85.0.4183.83 on Win10 Pro 64. It’s the Docker based installation.

I have temperature data coming in on mqtt and wanted to have some running chart displays of the temp values over time. Right now, the clients are publishing every 10 seconds for dev/testing. I’ve tried plotting just the values as they come in, a TIMEAGGREGATE version of it , and also set up a history column data range with no luck. Whenever I add the chart, the browser bogs down when drawing the chart and some times I have to stop and restart Streamsheets tabs before I can see the chart. Whether I have to restart the tabs after laying out the chart or not, once I change the Xaxis to “Time” type, Chrome really starts sucking up cpu cylces and becomes very slow and unresponsive. The Stream Machine however seems to stay on top of processing incoming data so that’s awesome!

I tried using line and xy charts with Yaxis data and the results seem exactly the same. I tried to add a chart that displays the results of a randbetween function with similar results.

I was running with the Stream in “on message arrival” processing mode and thought that might be causing problems for the chart update but changing the processing mode to “continuous” didn’t seem to help.

Any advice sincerely appreciated.

Hi Kweb,

thanks for sharing! :slightly_smiling_face:

I am not quite sure what it is yet, however, this is certainly something we should get working as it sounds like a typical use case for Streamsheets.
Could you share a screenshot of what your Streamsheet looks like? Optimally, you could even go to the settings of your sheet (clicking the cogwheel), go to the “Sheet” tab and enable “Show Formulas”.

Do I understand it correctly that chrome seems to not being able to handle you inserting a chart and, then, is overwhelmed?

In any case, the “on message arrival” mode shouldn´t be the problem and sounds like the right one for your use case. In addition, the frequency of your messages should not be the problem either. :ok_hand:

As you noticed, Streamsheets keep running even if the browser runs into problems. That is because each Stream App runs on the server (in this case your computer) and the browser is only in charge of providing the user interface. This is only why Streamsheets keeps running even if you close all browsers. :muscle:
Streamsheets does some automatic balancing in order not to overwhelm your chrome browser, however, that would typically come into play if your app ran about 100-1000 times faster.
You can influence this balancing manually as well. In the top bar right next to the play buttons you find “Cycle and Interval”. Here, you cannot only set the cycle time for the “continuously” mode but also define the Update Interval. For instance, an update interval of 10 means, that the browser visualizes only each 10th calculation step although all steps are being processed. In your dev/testing this would mean that every 10 seconds a new message arrives and is being processed but the visualization updates only every 100 seconds.


Attached screenshot of sheet with formulas shown. I’ve had issues with attempting to plot cells D7 or E21. Anytime the Xaxis type is set to Time, it exhibits the issue.
BTW: this is a simplified sheet that is a subset of the other sheet where I originally encountered the issue and I’m not experiencing the issue when the chart is added now; only when the chart Xaxis type is changed to Time. I may be doing this wrong so thank you very much your attention!

Hello kweb,

Of course, we´ll get to the bottom of this! :muscle:
I tried to replicate the issue, however, there might be something missing still.

In your last post you mentioned that you do not encounter the problem anymore unless you change the xAxis type to Time. Is this correct?
In the screenshot you see that I rebuilt the formulas and with this logic, the charts work for me.

Which chart type do you use?
[Timeaggregate] In order to create a line chart with a time xAxis, simply select the cell which contains the Timeaggregat(), click on the chart icon and then open up the chart (Here, you do not have to select a chart type)
[Based on a column history] In B23:C100 I built a history of values and created a basic “line chart” based on this.
However, in my case using Time as the xAxis type does not make much sense because the Time column is formatted as a string, therefore, only the category type makes sense.

The browser performance should not be affected at all in this setup.
Nonetheless, it is possible that the “datetime” parameter causes some trouble as it is received as text (green in the inbox). As far as I see this is not converted in any cell, thus, remains a text throughout the sheet. If you want to use this parameter in your charts, converting it into a serial number should help, e.g. with JSONTIME2EXCEL().
Let me know whether this helps.

Again, it took a while to get back to this. I was making it a lot harder than it is! I was trying to plot a timeaggregate cell against a column or row of time values or scaled time values. Your chart simply takes a timeaggregate cell’s data and does the time mapping automatically… You couldn’t have made it simpler!
Thank you for your very kind guidance.


Always happy to help :blush: