diff --git a/rowers/.#interactiveplots.py b/rowers/.#interactiveplots.py new file mode 100644 index 00000000..ef817ef8 --- /dev/null +++ b/rowers/.#interactiveplots.py @@ -0,0 +1 @@ +E408191@CZ27LT9RCGN72.15972:1488820163 \ No newline at end of file diff --git a/rowers/dataprep.py b/rowers/dataprep.py index 29cdb2a2..d15df5f0 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -753,11 +753,12 @@ def getrowdata_db(id=0,doclean=False): return data,row # Fetch a subset of the data from the DB -def getsmallrowdata_db(columns,ids=[],doclean=True): +def getsmallrowdata_db(columns,ids=[],doclean=True,workstrokesonly=True): prepmultipledata(ids) data = read_cols_df_sql(ids,columns) if doclean: - data = clean_df_stats(data,ignorehr=True) + data = clean_df_stats(data,ignorehr=True, + workstrokesonly=workstrokesonly) return data diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 6e660d8a..2c775882 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -1167,7 +1167,8 @@ def interactive_flex_chart2(id=0,promember=0, 'power','hr','spm','driveenergy', 'time','pace','workoutstate','time'] - rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True) + rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True, + workstrokesonly=workstrokesonly) rowdata.dropna(axis=1,how='all',inplace=True) rowdata.dropna(axis=0,how='any',inplace=True) diff --git a/rowers/views.py b/rowers/views.py index cb27a9e0..66defa93 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -3430,6 +3430,7 @@ def workout_flexchart3_view(request,*args,**kwargs): plottype=plottype,workouttype=workouttype, reststrokes=reststrokes) f.save() + if request.method == 'POST' and 'workstrokesonly' in request.POST: workstrokesonly = request.POST['workstrokesonly'] if workstrokesonly == 'True':