I am attempting to use rangebreaks
to remove weekends, non-trading hours (UTC) and some specific dates. I have successfully been removing weekends and non-trading hours but am having trouble when adding some specific dates. Below is an example of before / after adding the dates. The time series starts to overlap itself. The first picture works properly using the below code to remove weekends and non-trading hours, but when I add the two dates to remove it looks like the lower picture where the time series starts overlapping itself.
Has anyone seen this or can help? Thanks!
EDIT:
Looks like this is a common issue and has been asked about before but it did not get any answers. Hoping this post will find someone who’s encountered it.
fig.update_xaxes(rangebreaks=[
# dict(values=["2023-03-14", "2023-03-15"]), # Line that causes the overlap
dict(bounds=[20, 13.5], pattern="hour"),
dict(bounds=["sat", "mon"]),
])