Black Lives Matter. Please consider donating to Black Girls Code today.

Streaming graphs locally

Hi,

How would I stream plotly graphs locally? In my case I’m doing some machine learning, and want to stream training data real time to a local server.

This doesn’t appear to be a plotly.js related question.

The plotly streaming services are only for streaming data through our platform. To stream data to a graph locally, you will need to implement your own streaming service and as data is received, add it to your chart (likely using long polling or websockets).

1 Like

possible to resume streaming? i.e. append data to existing plot

You can look at the Plotly.extendtraces and Plotly.prependtraces for pushing new points to the end or front of an existing trace attribute respectively.

1 Like

Hey, do you know if i can set a minimum xrange on a streaming chart ? ( I’m using time as the x-axis…)

How did you learn about prependTraces and extendTraces? I’m surprised they still haven’t been documented (see github.com/plotly/documentation/issues/250, which for some odd reason I can’t link to.

CC @Miklos.