Update (not extend) graph data but not layout

Hi!, i want to update a graph with 9 traces evety second with an interval. I don´t want to update de hole figure, just the graph.data. I have seen the prependData and extendData but i´m not sure if this is what i have to use to make what i want



Just to clarify, do you want to add new traces to the figure or do you want to add extra points/lines ?

Same traces, always, and i just want to update the data points, not the hole figure to optimize performance.

Ok. You can use extendData in this case, even if you want to replace all current points with new ones, because there is no “updateData” equivalent. The way to do it is to pass maxPoints explicitly and select a value that matches the length of the added data. Here you can find the original documentation in JS, where there is one example in which only 10 points of each trace are kept after each update.

Please let me know if you cant still figure this out. I have a few examples I can provide you regarding extendData and the syntax is a bit complicated/undocumented.