diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index faad59d2..063ff6f0 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -365,6 +365,9 @@ def interactive_boxchart(datadf, fieldname, extratitle='', plot.y_range = yrange1 plot.sizing_mode = 'stretch_both' + if extratitle: + plot.title.text = extratitle + plot.xaxis.axis_label = 'Date' plot.yaxis.axis_label = axlabels[fieldname] @@ -1970,6 +1973,7 @@ def performance_chart(user, startdate=None, enddate=None, kfitness=42, kfatigue= def interactive_histoall(theworkouts, histoparam, includereststrokes, spmmin=0, spmmax=55, + extratitle='', workmin=0, workmax=1500): TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,crosshair' @@ -2013,6 +2017,10 @@ def interactive_histoall(theworkouts, histoparam, includereststrokes, toolbar_location="above" ) + if extratitle: + plot.title.text = extratitle + + # add watermark watermarkurl = "/static/img/logo7.png" watermarkrange = Range1d(start=0, end=1) @@ -4470,6 +4478,9 @@ def interactive_multiflex(datadf, xparam, yparam, groupby, extratitle='', gr=groupname, ) + if extratitle is not None: + title = title+' '+extratitle + if xparam == 'cumdist': # pragma: no cover res = make_cumvalues(datadf[xparam]) datadf[xparam] = res[0] @@ -4659,6 +4670,7 @@ def interactive_cum_flex_chart2(theworkouts, promember=0, yparam1='power', yparam2='spm', workstrokesonly=False, + extratitle='', trendline=False): # datadf = dataprep.smalldataprep(theworkouts,xparam,yparam1,yparam2) @@ -4789,6 +4801,10 @@ def interactive_cum_flex_chart2(theworkouts, promember=0, plot.extra_x_ranges = {"watermark": watermarkrange} plot.sizing_mode = 'stretch_both' + if extratitle: + plot.title.text = extratitle + + plot.image_url([watermarkurl], watermarkx, watermarky, watermarkw, watermarkh, global_alpha=watermarkalpha, diff --git a/rowers/templates/statsdiv.html b/rowers/templates/statsdiv.html index a4072f22..767c99b4 100644 --- a/rowers/templates/statsdiv.html +++ b/rowers/templates/statsdiv.html @@ -1,6 +1,6 @@ {% if stats %} -