Controlling 'now' for X-axis?

183 views
Skip to first unread message

Scott Miller

unread,
Oct 7, 2017, 3:39:25 PM10/7/17
to Smoothie Charts
It looks like the X-axis's idea of 'now' is tied to the local system's clock.  Is that right?  Is there any provision for displaying a time series that doesn't have a synchronized real-time clock?  I'm pulling data via JSON from sensors in an embedded device that doesn't have an RTC.  The samples are all timestamped with the number of milliseconds since system startup, but it has no sense of when 'now' is in absolute terms.

I think I can work around this without modifying smoothie.js by having my code take the first timestamp returned and add the current clock time offset, and then add that offset to each subsequent point.

I worry that it's still going to have trouble with drift.  I'm only displaying at most a few seconds of data that's scrolling by at maybe 15 samples/second, so to keep displaying current data it needs to stay in close sync.

I can't find anything about how the X axis works in the docs.

Thanks,

Scott

David Zuliani

unread,
Aug 14, 2018, 8:06:29 PM8/14/18
to Smoothie Charts
Hi Scott,
I've have the same problem. Have you found any solution?

Scott Miller

unread,
Aug 14, 2018, 8:09:17 PM8/14/18
to smoothi...@googlegroups.com
I've just been using the solution I described - making the timestamps up based on the local clock.  It's been working well enough, but for now I'm only using it for short-term diagnostic displays and I'm not sure how it'll do with long runtimes.

--
You received this message because you are subscribed to a topic in the Google Groups "Smoothie Charts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/smoothie-charts/iDRO-ioIcKs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to smoothie-charts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Zuliani

unread,
Aug 15, 2018, 6:24:26 PM8/15/18
to Smoothie Charts
Ok, if you're still interested I've found the option nonRealtimeData which allow you to take the control of the x-axis

Bye
To unsubscribe from this group and all its topics, send an email to smoothie-char...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages