diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 4c6e75a9..0797271f 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -4070,7 +4070,8 @@ def interactive_streamchart(id=0, promember=0): return [script, div] -def instroke_interactive_chart(df,metric, workout, spm_min, spm_max): +def instroke_interactive_chart(df,metric, workout, spm_min, spm_max, + activeminutesmin, activeminutesmax): df_pos = (df+abs(df))/2. df_min = -(-df+abs(-df))/2. @@ -4157,7 +4158,20 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max): text_color='black', ) + s2 = 'Time: {activeminutesmin} - {activeminutesmax} min'.format( + activeminutesmin=activeminutesmin, + activeminutesmax=activeminutesmax + ) + + label2 = Label(x=50,y=400, x_units='screen', y_units='screen', + text=s2, + background_fill_alpha=0.7, + background_fill_color='white', + text_color='black', + ) + plot.add_layout(label) + plot.add_layout(label2) plot.varea('x', y1='high', y2='low',source=source,fill_color="lightgray",alpha=0.5) diff --git a/rowers/templates/instroke_interactive.html b/rowers/templates/instroke_interactive.html index 7679dd0b..7fd5972e 100644 --- a/rowers/templates/instroke_interactive.html +++ b/rowers/templates/instroke_interactive.html @@ -119,7 +119,7 @@ $( function() {