Candlestick plot performance

I’m generating candlestick plots for larger datasets (5m intervals for 2 months) and i’m having problems with performance.
The stored html file is roughly 5Mb - but opening the plot in chrome results in a lagging plot, where zooming takes multiple seconds.
It’s not memory (the tab takes ~200Mb of memory) - nor cpu (almost no cpu usage according to Chrome task manager), but still it’s slow.

There’s “only” 17000 candles in this plot, which does sound like a lot, but it really isn’t (it’s only 2 months - i would have data for 2 years …).
i assume using webgl would fix this - but i couldn’t find any reference to a candlestickgl chart.

My plan was to use dash in the future (with the same data) for visualization, but this performance will be unacceptable to users.

Is there a way to use plotly for this type of plot, or do i need to search for specific charting libraries that support this amount of data better?

2 Likes

I an also having big performance hit when I go above 2K OHLC data… I am using i9 with 16gb ram. Is there even a option available for Candlestickgl chart?

Same, I am also finding candlestick charts with 1 minute data, out to 1 year, very slow on Dash/Plotly. The data takes a long time to load in, the dash app becomes unresponsive, and the graph becomes very laggy when zooming in or using the scrollbar. But if I resample the data to less candles (e.g. Daily), it goes a lot faster, so it has to do with the candle numbers (# data points being fed in). The 1min data is only 2.8mb.

Did you guys ever come up with a solution? From the previous charting software I was using, 100k candles was pretty light work, but plotly can’t handle 100k. Not sure how to approach this problem, do I only plot 1000 candles then update if the user wants to scroll back / forward in history?