1 fig = go.Figure(data=[go.Candlestick(x=df['date'], open=df['Open'], high=df['High'], low=df['Low'], close=df['Close'])])
2 fig.update_xaxes(
3 rangeslider_visible=True,
4 rangebreaks=[
5 # NOTE: Below values are bound (not single values), ie. hide x to y
6 dict(bounds=["sat", "mon"]), # hide weekends, eg. hide sat to before mon
7 dict(bounds=[16, 9.5], pattern="hour"), # hide hours outside of 9.30am-4pm
8 # dict(values=["2020-12-25", "2021-01-01"]) # hide holidays (Christmas and New Year's, etc)
9 ]
10 )
11 fig.update_layout(
12 title='Stock Analysis',
13 yaxis_title=f'{symbol} Stock'
14 )
15
16 fig.show()
17