Hello, using the implementation here for x-axis rangebreaks… If you use say 10+ years of data the plots get ultra laggy to the point where they are virtually unusable. I really like the implementation below because you can get rid of candlestick gaps but at this point based on how laggy the chart becomes I think the cost outweighs the benefit. Does anyone have an idea how I might implement the below without sacrificing the performance of the rendering and scrolling over the chart itself?
Thank you very much.
import plotly.express as px
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')
fig = px.scatter(df, x='Date', y='AAPL.High', range_x=['2015-12-01', '2016-01-15'],
title="Hide Weekend and Holiday Gaps with rangebreaks")
fig.update_xaxes(
rangebreaks=[
dict(bounds=["sat", "mon"]), #hide weekends
dict(values=["2015-12-25", "2016-01-01"]) # hide Christmas and New Year's
]
)
fig.show()