Hi everyone,
I’m relatively new to web development and currently working on a Dash web app that interacts with Bluetooth Low Energy (BLE) devices. The app allows users to scan for devices, connect/disconnect, and request various data types. So far, I’ve managed to implement these functionalities, and I store the incoming data every x interval into a dcc.Store
component.
My goal now is to plot this data smoothly in real-time on a graph. I plan to append the newly received data to another data structure, plot it, and then shift off the plotted data to maintain memory efficiency.
I’m considering using another dcc.Store
component or a JavaScript global variable to manage this accumulating data. I know using a clientside callback with a very short interval could work for smooth plotting, but I’m unsure about the best way to structure the data storage and management.
Should I use an additional dcc.Store
for appending and plotting the data or would a global js variable be more appropriate for handling real-time data updates?
Also
What would be the most efficient way to manage and plot this real-time data in Dash?
Is there a recommended approach or best practice for shifting off plotted data to manage memory?
Any suggestions or ideas would be greatly appreciated, especially if there are alternative approaches to handling this kind of real-time data interaction in a Dash application.
Thank you!