Update_xaxes bounds not working

My dataframe looks like below.

DatetimeIndex(['2021-06-02 09:15:00+05:30', '2021-06-02 09:20:00+05:30',
               '2021-06-02 09:25:00+05:30', '2021-06-02 09:30:00+05:30',
               '2021-06-02 09:35:00+05:30', '2021-06-02 09:40:00+05:30',
               '2021-06-02 09:45:00+05:30', '2021-06-02 09:50:00+05:30',
               '2021-06-02 09:55:00+05:30', '2021-06-02 10:00:00+05:30',
               ...
               '2021-06-03 14:45:00+05:30', '2021-06-03 14:50:00+05:30',
               '2021-06-03 14:55:00+05:30', '2021-06-03 15:00:00+05:30',
               '2021-06-03 15:05:00+05:30', '2021-06-03 15:10:00+05:30',
               '2021-06-03 15:15:00+05:30', '2021-06-03 15:20:00+05:30',
               '2021-06-03 15:25:00+05:30', '2021-06-03 15:30:00+05:30'],
              dtype='datetime64[ns, Asia/Kolkata]', name='Datetime', length=151, freq=None)

I am trying to skip the missing non-market hour from 3:30 pm to 9:15 am from the plotly chart. I did the following, but it’s not working:

fig.update_xaxes(tickformat="%X", rangebreaks=[dict(bounds=[15.5, 9.25], pattern='hour')])

Can you help please?
I don’t want to set xaxes type as β€˜category’.

Dash: β€˜1.19.0’
Plotly: β€˜4.14.1’

1 Like