python 3.6 latest plotly used : The python Graph is created using plotly offline/Online function where three different dataframe inputs are used for y axis plotting and x axis are shared (In general it is Date index). The graphs are perfectly fine.
Only active area data on current layout's graph shown for the particular subplot layout, I want all the three layout data display when hovering the mouse in any layout.How to achieve this ?
eq_high = go.Scatter(
x=df.index,
y=df['High'],
name = "EQHigh",
line = dict(color = '#3EBF06'),
opacity = 0.8)
eq_low = go.Scatter(
x=df.index,
y=df['Low'],
name = "EQLow",
line = dict(color = '#FD2D00'),
opacity = 0.8)
##
op_high_ce = go.Scatter(
x=stock_opt_ce.index,
y=stock_opt_ce['High'],
name = "OpHighCE",
line = dict(color = '#15655F'),
opacity = 0.8)
op_low_ce = go.Scatter(
x=stock_opt_ce.index,
y=stock_opt_ce['Low'],
name = "OpLowCE",
line = dict(color = '#0D7B7F'),
opacity = 0.8)
op_last_ce = go.Scatter(
x=stock_opt_ce.index,
y=stock_opt_ce['Last'],
name = "OpLastCE",
line = dict(color = '#6AA6A2'),
opacity = 0.8)
op_settlePr_ce = go.Scatter(
x=stock_opt_ce.index,
y=stock_opt_ce['Settle Price'],
name = "OpSettlePrCE",
line = dict(color = '#2AADD1'),
opacity = 0.8)
##
op_high_pe = go.Scatter(
x=stock_opt_pe.index,
y=stock_opt_pe['High'],
name = "OpHighPE",
line = dict(color = '#FA6300'),
opacity = 0.8)
op_low_pe = go.Scatter(
x=stock_opt_pe.index,
y=stock_opt_pe['Low'],
name = "OpLowPE",
line = dict(color = '#AC4C0D'),
opacity = 0.8)
op_last_pe = go.Scatter(
x=stock_opt_pe.index,
y=stock_opt_pe['Last'],
name = "OpLastPE",
line = dict(color = '#E19B6D'),
opacity = 0.8)
op_settlepr_pe = go.Scatter(
x=stock_opt_pe.index,
y=stock_opt_pe['Low'],
name = "OpSettlePrPE",
line = dict(color = '#A54E1F'),
opacity = 0.8)
data = [eq_high,eq_low,op_high_ce,op_low_ce,op_settlePr_ce,op_high_pe,op_low_pe,op_settlepr_pe]
#custome Date Range plotting
layout = dict(
title = "Graph",
xaxis = dict(
range = ['2017-10-1','2017-11-27'])
)
fig = dict(data=data, layout=layout)
iplot(fig, filename = "CorrelationOfEquityAndOptionData")
plot(fig,show_link = False)
1.what changes to be made in the above code to show all three layout data values while mouse hovering.currently it shows only one layout graph values.
2.How to show the graph data points on right side or top side or bottom side or left side ,rather than showing the graph data onto the graph.
3.Any better optimized way of doing this.
Expected result: