Values not Showing

82 views
Skip to first unread message

Benedikt

unread,
May 10, 2019, 5:16:40 AM5/10/19
to Smoothie Charts
I am appending values to the time series but only seeing a line in the chart after a huge delay (minutes).

The data is there when I look at the object.

When updating faster, values are shown immediately.

Here is part of the code:

tileContents.chart = new SmoothieChart({millisPerPixel:45, interpolation:'line',tooltip:true, grid:{fillStyle:'transparent'}, responsive:true, labels:{fillStyle:'#000000'}});
tileContents.chart.streamTo($('#' + tileContents.UUID).find('#canvas')[0],0);
tileContents.chartTimeSeries.push(new TimeSeries());
tileContents.chart.addTimeSeries(tileContents.chartTimeSeries[0], {lineWidth:2,strokeStyle:'#ae25f7'});

this.chartTimeSeries[0].append(timeStamp, data1.value);

Any ideas what I am experiencing? Bug or user error?

Drew Noakes

unread,
May 11, 2019, 1:38:37 PM5/11/19
to smoothie-charts
The 'timeStamp' you append to your series must be correct on the client computer (i.e. relative to the browser's concept of 'now').

If your timestamp comes from the server, then it may be out of sync with the client and can cause the kinds of delay you describe. If that's the case, you'll need to determine the offset on your first data point and apply that offset to every timestamp.

--
You received this message because you are subscribed to the Google Groups "Smoothie Charts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothie-char...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smoothie-charts/15c32527-de89-4525-a35d-c4038f72379c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Benedikt

unread,
May 12, 2019, 2:04:55 PM5/12/19
to Smoothie Charts
Thanks for your help, that might be it, will test tomorrow.


Am Samstag, 11. Mai 2019 19:38:37 UTC+2 schrieb Drew Noakes:
The 'timeStamp' you append to your series must be correct on the client computer (i.e. relative to the browser's concept of 'now').

If your timestamp comes from the server, then it may be out of sync with the client and can cause the kinds of delay you describe. If that's the case, you'll need to determine the offset on your first data point and apply that offset to every timestamp.

On Fri, 10 May 2019 at 02:16, Benedikt <13bma...@gmail.com> wrote:
I am appending values to the time series but only seeing a line in the chart after a huge delay (minutes).

The data is there when I look at the object.

When updating faster, values are shown immediately.

Here is part of the code:

tileContents.chart = new SmoothieChart({millisPerPixel:45, interpolation:'line',tooltip:true, grid:{fillStyle:'transparent'}, responsive:true, labels:{fillStyle:'#000000'}});
tileContents.chart.streamTo($('#' + tileContents.UUID).find('#canvas')[0],0);
tileContents.chartTimeSeries.push(new TimeSeries());
tileContents.chart.addTimeSeries(tileContents.chartTimeSeries[0], {lineWidth:2,strokeStyle:'#ae25f7'});

this.chartTimeSeries[0].append(timeStamp, data1.value);

Any ideas what I am experiencing? Bug or user error?

--
You received this message because you are subscribed to the Google Groups "Smoothie Charts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothi...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages