Hi All!
Looking for some help on this:
I’m trying to create a chart with 2 Y-axis.
The first is a candlestick chart, the 2nd is a simple line chart.
Both have the same X axis.
When I plot this, the x-axis of the candlestick chart is covering up my line chart. Is there a way to force x-axis labels to be under the line graph instead?
traces = []
#yy/mm/dd H
traces.append(go.Candlestick(
name = 'Candlestick',
x=df['x'],
open=df.Open,
high=df.High,
low=df.Low,
close=df.Close))
## Y2
traces.append(go.Scatter(x=df['x'], y=k['data'], mode='lines',name=k['name'], showlegend=False, yaxis="y2"))
Layout:
title=agg,
margin={'l': 10, 'r': 10, 't': 40, 'b': 10},
yaxis={
"domain":[.3, 1]
},
yaxis2={
"side": "right",
"domain": [0, 0.3]
},
xaxis={
"type": 'category',
"categoryorder": 'category ascending',
"showspikes": True,
"tickangle" : 45,
"range": [s-50,s]
},
uirevision = symbol,
showlegend=True,
legend_orientation="h",
legend=dict(x=.25, y=1.1),
)