Rangebreaks with bounds and values show overlapping candlesticks

Was trying to plot a candlestick for a period of time using plot.ly python lib, and encountered this issue that I don’t know how to resolve. Would appreciate any help.

Below is code:

fig.update_xaxes(
        rangebreaks=[
            dict(pattern='hour', bounds=[16, 9.5]),  #hide after hours
            dict(bounds=["sat", "mon"]),  #hide weekends
            dict(values=["2020-09-07"])  # hide US labor day (monday)
        ])

The candlesticks (in 30m) overlap between [β€œ2020-09-01 11:30”, β€œ2020-09-04 15:30”] and [β€œ2020-09-08 9:30”, β€œ2020-09-11 13:30”].

Btw, the 1day candlesticks seem good. No gap or overlaps.

1 Like