Streaming data points to online chart

Would there be a solid way to continuously stream data points to a local chart embedded inside your application GUI or displayed in a browser, such that a line or scatter chart would continuously get their next datum from your application as your application is receiving/creating that data in real time, and the plotly chart will update its display accordingly as the data continuously flows in?

I think there is. You can check my questions with working example where Dash callback checks data queue which is sent from another thread. You can get data from another process via sockets, for exampleโ€ฆ

You can feed a SQLite table on the one hand, without involving Dash at this point,

And then use dash with dcc.Interval to query this table every X seconds,
Then, use Patch() to only add the data to your chart, without re-generating the whole figure everytime the callback is triggered.

I did proceed this way for a live tracking app.

1 Like