Real time graphing in app inventor

371 views
Skip to first unread message

Skyler

unread,
Oct 10, 2017, 8:14:54 PM10/10/17
to MIT App Inventor Forum
Disclaimer: If a graphing library exists that can easily do what I am trying to do I would be more than happy to switch to that so that would similarly resolve this for me. 

I am currently working on graphing data that I am receiving in real time and for now I have this test block that graphs a generated sine wave. Eventually I am intending to replace that with a poll to a current variable value. For now though the graph clears everything and swipes back to left to start drawing more lines. Is there any simple way I can shift the graph once it reaches the far right such that the oldest elements get truncated out. Whatever method I implement needs to work in far excess of the view window time period so the methods that came to mind seemed like they would cause a memory leak.


SteveJG

unread,
Oct 10, 2017, 8:30:23 PM10/10/17
to MIT App Inventor Forum
This thread discusses two ways to possibly do what you want with a graph   One uses a graphic library which may require an Internet connection (or perhaps not), the other displays a continuous 
waveform using native blocks.  It starts a new trace after a set limit of monitoring.  Either solution might be suitable for what you are attempting.  

Regards,
Steve

Skyler

unread,
Oct 10, 2017, 10:45:19 PM10/10/17
to MIT App Inventor Forum
Hi Steve, you didn't include a link to the aforementioned thread.

SteveJG

unread,
Oct 11, 2017, 8:25:47 AM10/11/17
to MIT App Inventor Forum
Reply all
Reply to author
Forward
0 new messages