Live Candlestick Graph issue with ExtendData

Ok, I see what you mean now. You are not interested in extend the data with new candles (for new timestamps), but to update past N candles with newer data.

There is still a way to do it though… The extendData array expects an optional maxPoints value on the third element. So what you can do is to use the figure state (that you are adding to the callback) to get the candles already defined in the chart, updates the values that you want and send all the points back to extendData. Then make sure to make maxPoints = len(data), so basically the update will remove all old points and add the old points with the new. I believe this should be superior in speed than modifying the trace directly (what you can also do, and return the figure dict).

I thought I have written a similar answer with an example before, but I just stated the same as above (you can find the thread I refer to here).

Let me know if this helps.