preparing multi compare for sliders
This commit is contained in:
@@ -3780,6 +3780,7 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
|
|||||||
colors = itertools.cycle(palette)
|
colors = itertools.cycle(palette)
|
||||||
|
|
||||||
cntr = 0
|
cntr = 0
|
||||||
|
l1 = []
|
||||||
|
|
||||||
for id,color in itertools.izip(ids,colors):
|
for id,color in itertools.izip(ids,colors):
|
||||||
group = datadf[datadf['workoutid']==int(id)].copy()
|
group = datadf[datadf['workoutid']==int(id)].copy()
|
||||||
@@ -3826,12 +3827,12 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
|
|||||||
legend=str(id)
|
legend=str(id)
|
||||||
|
|
||||||
if plottype=='line':
|
if plottype=='line':
|
||||||
l1 = plot.line('x','y',source=source,color=color,legend=legend)
|
l1.append(plot.line('x','y',source=source,color=color,legend=legend))
|
||||||
else:
|
else:
|
||||||
l1 = plot.scatter('x','y',source=source,color=color,legend=legend,
|
l1.append(plot.scatter('x','y',source=source,color=color,legend=legend,
|
||||||
fill_alpha=0.4,line_color=None)
|
fill_alpha=0.4,line_color=None))
|
||||||
|
|
||||||
plot.add_tools(HoverTool(renderers=[l1],tooltips=TIPS))
|
plot.add_tools(HoverTool(renderers=[l1[cntr]],tooltips=TIPS))
|
||||||
cntr += 1
|
cntr += 1
|
||||||
|
|
||||||
plot.legend.location='bottom_right'
|
plot.legend.location='bottom_right'
|
||||||
|
|||||||
Reference in New Issue
Block a user