I am receiving data being sent live from a piece of hardware that is running continuously. Right now I start with a blank scatter plot and I’m calling Plotly.extendTraces to append the new data to the plot. This works great. However as you may imagine, since the data just keeps coming in, my plot just gets more and more data. What I need is to be able to purge the oldest plotted values when new values are appended, so that I have a moving window in time displayed in the plot.
How do I delete data from the start of the trace to achieve this?
I created this codepen: