diff --git a/requirements.txt b/requirements.txt index c8108737..d7f1e8b0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -157,7 +157,7 @@ ratelim==0.1.6 redis==3.2.1 requests==2.21.0 requests-oauthlib==1.2.0 -rowingdata==2.2.7 +rowingdata==2.3.1 rowingphysics==0.5.0 rq==1.0 rq-dashboard==0.4.0 diff --git a/rowers/forms.py b/rowers/forms.py index 4e1d910c..173bf4b7 100644 --- a/rowers/forms.py +++ b/rowers/forms.py @@ -840,6 +840,7 @@ palettechoices = tuple((p,p) for p in palettes.keys()) analysischoices = ( ('boxplot','Box Chart'), ('trendflex','Trend Flex'), + ('histo','Histogram'), ) class AnalysisChoiceForm(forms.Form): diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 01146381..64a18653 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -1225,14 +1225,14 @@ def interactive_histoall(theworkouts,histoparam,includereststrokes): rowdata.dropna(axis=0,how='any',inplace=True) if rowdata.empty: - return "","No Valid Data Available","","" + return "","No Valid Data Available" try: histopwr = rowdata[histoparam].values except KeyError: - return "","No data","","" + return "","No data" if len(histopwr) == 0: - return "","No valid data available","","" + return "","No valid data available" # throw out nans histopwr = histopwr[~np.isinf(histopwr)] @@ -1341,7 +1341,6 @@ def interactive_histoall(theworkouts,histoparam,includereststrokes): script = '' div = '' - return [script,div] def course_map(course): diff --git a/rowers/templates/user_analysis_select.html b/rowers/templates/user_analysis_select.html index c5ee4387..6b8a8e95 100644 --- a/rowers/templates/user_analysis_select.html +++ b/rowers/templates/user_analysis_select.html @@ -93,6 +93,10 @@ plotfield.show(); }; + if (functionfield.val() == 'histo') { + plotfield.show() + } + if (functionfield.val() == 'trendflex') { x_param.show(); y_param.show(); @@ -119,7 +123,16 @@ palette.hide(); binsize.hide(); errorbars.hide(); - } + } + else if (Value=='histo') { + plotfield.show(); + x_param.hide(); + y_param.hide(); + groupby.hide(); + palette.hide(); + binsize.hide(); + errorbars.hide(); + } else if (Value=='trendflex') { x_param.show(); y_param.show(); @@ -135,7 +148,15 @@ }); - +