diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 27a56367..3cf6b670 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -1604,10 +1604,6 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line', if datadf.empty: return ['','

No non-zero data in selection

','',''] - - - - if xparam != 'distance' and xparam != 'time' and xparam != 'cumdist': xaxmax = yaxmaxima[xparam] xaxmin = yaxminima[xparam] @@ -1673,17 +1669,29 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line', group ) + TIPS = OrderedDict([ + ('time','@ftime'), + ('pace','@fpace'), + ('hr','@hr'), + ('spm','@spm{1.1}'), + ('distance','@distance{5}'), + ]) + + hover = plot.select(type=HoverTool) + hover.tooltips = TIPS + if labeldict: legend=labeldict[id] else: legend=str(id) if plottype=='line': - plot.line('x','y',source=source,color=color,legend=legend) + l1 = plot.line('x','y',source=source,color=color,legend=legend) else: - plot.scatter('x','y',source=source,color=color,legend=legend, + l1 = plot.scatter('x','y',source=source,color=color,legend=legend, fill_alpha=0.4,line_color=None) + plot.add_tools(HoverTool(renderers=[l1],tooltips=TIPS)) cntr += 1 plot.legend.location='bottom_right'