added support for dynamic names

This commit is contained in:
Gert Wohlgemuth 2018-05-06 23:09:38 -07:00
parent cec3014790
commit 08ca4f10ba

View File

@ -109,7 +109,9 @@ def plot_rsi_dataframe(data, fig, args, plotnumber):
:param args:
:return:
"""
rsi = go.Scattergl(x=data['date'], y=data[args.plotrsi], name='RSI')
if args.plotrsi:
for x in args.plotrsi:
rsi = go.Scattergl(x=data['date'], y=data[x], name=x)
fig.append_trace(rsi, plotnumber, 1)
@ -122,7 +124,7 @@ def plot_cci_dataframe(data, fig, args, plotnumber):
:param args:
:return:
"""
chart = go.Scattergl(x=data['date'], y=data[args.plotcci], name='CCI')
chart = go.Scattergl(x=data['date'], y=data[args.plotcci], name=args.plotcci)
fig.append_trace(chart, plotnumber, 1)