import plotly.express as px
import plotly.graph_objects as go
trace = {
'x': dataset.date + " " + dataset.time,
'open': dataset.open,
'close': dataset.close,
'high': dataset.high,
'low': dataset.low,
'type': 'candlestick',
'name': 'EURUSD'
}
layout = go.Layout({
'title': {
'text': 'EUR / USD',
'font': {
'size': 15
}
}
})
fig = go.Figure(data = [trace], layout=layout)
fig.show()
Hello @aadarsh and welcome to the plotly community !
Have you checked out this example from the docs for hiding weekends and non business hours in timeseries visualizations.
Go to the Hiding Weekends and holidays sections on this page.
Yep, Encountering this issue!
def plyplot(dataset, name = ""):
trace = {
'x': dataset.date + " " + dataset.time,
'open': dataset.open,
'close': dataset.close,
'high': dataset.high,
'low': dataset.low,
'type': 'candlestick',
'name': name
}
layout = go.Layout({
'title': {
'text': name,
'font': {
'size': 15
}
}
})
fig = go.Figure(data = [trace], layout=layout)
fig.update_xaxes(
rangebreaks=[
dict(bounds=["sun", "sat"], pattern="day"),
]
)
fig.show()