fixing reststrokes on compare plot
This commit is contained in:
@@ -2203,6 +2203,7 @@ def getsmallrowdata_db(columns, ids=[], doclean=True,workstrokesonly=True,comput
|
|||||||
if compute and len(df):
|
if compute and len(df):
|
||||||
data = df.copy()
|
data = df.copy()
|
||||||
if doclean:
|
if doclean:
|
||||||
|
print('aap')
|
||||||
data = clean_df_stats(data, ignorehr=True,
|
data = clean_df_stats(data, ignorehr=True,
|
||||||
workstrokesonly=workstrokesonly)
|
workstrokesonly=workstrokesonly)
|
||||||
data.dropna(axis=1,how='all',inplace=True)
|
data.dropna(axis=1,how='all',inplace=True)
|
||||||
|
|||||||
@@ -1104,10 +1104,6 @@ class AnalysisChoiceForm(forms.Form):
|
|||||||
workmax = forms.FloatField(initial=1500,
|
workmax = forms.FloatField(initial=1500,
|
||||||
required=False,label = 'Max Work per Stroke')
|
required=False,label = 'Max Work per Stroke')
|
||||||
|
|
||||||
includereststrokes = forms.BooleanField(initial=False,
|
|
||||||
required=False,
|
|
||||||
label='Include Rest Strokes')
|
|
||||||
|
|
||||||
cpfitchoices = (
|
cpfitchoices = (
|
||||||
('data','Fit to Selected Workouts'),
|
('data','Fit to Selected Workouts'),
|
||||||
('automatic','Critical Power Rolling Data')
|
('automatic','Critical Power Rolling Data')
|
||||||
@@ -1119,6 +1115,12 @@ class AnalysisChoiceForm(forms.Form):
|
|||||||
piece = forms.IntegerField(initial=4,label='Ranking Piece (minutes)',
|
piece = forms.IntegerField(initial=4,label='Ranking Piece (minutes)',
|
||||||
required=False)
|
required=False)
|
||||||
|
|
||||||
|
includereststrokes = forms.BooleanField(initial=False,
|
||||||
|
required=False,
|
||||||
|
label='Include Rest Strokes')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class BoxPlotChoiceForm(forms.Form):
|
class BoxPlotChoiceForm(forms.Form):
|
||||||
yparam = forms.ChoiceField(choices=parchoices,initial='spm',
|
yparam = forms.ChoiceField(choices=parchoices,initial='spm',
|
||||||
label='Metric')
|
label='Metric')
|
||||||
|
|||||||
@@ -5370,20 +5370,25 @@ def interactive_bar_chart(id=0,promember=0):
|
|||||||
return [script,div]
|
return [script,div]
|
||||||
|
|
||||||
def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
|
def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
|
||||||
promember=0,
|
promember=0,workstrokesonly=True,
|
||||||
labeldict=None,startenddict={}):
|
labeldict=None,startenddict={}):
|
||||||
|
|
||||||
message = ''
|
message = ''
|
||||||
errormessage = ''
|
errormessage = ''
|
||||||
|
|
||||||
|
|
||||||
columns = [xparam,yparam,
|
columns = [xparam,yparam,
|
||||||
'ftime','distance','fpace',
|
'ftime','distance','fpace',
|
||||||
'power','hr','spm',
|
'power','hr','spm',
|
||||||
'time','pace','workoutstate',
|
'time','pace','workoutstate',
|
||||||
'workoutid']
|
'workoutid']
|
||||||
|
|
||||||
datadf = dataprep.getsmallrowdata_db(columns,ids=ids,doclean=False,compute=False)
|
compute = False
|
||||||
|
doclean = False
|
||||||
|
if workstrokesonly:
|
||||||
|
compute = True
|
||||||
|
doclean = True
|
||||||
|
datadf = dataprep.getsmallrowdata_db(columns,ids=ids,doclean=doclean,compute=compute,
|
||||||
|
workstrokesonly=workstrokesonly)
|
||||||
datadf.dropna(axis=1,how='all',inplace=True)
|
datadf.dropna(axis=1,how='all',inplace=True)
|
||||||
datadf.dropna(axis=0,how='any',inplace=True)
|
datadf.dropna(axis=0,how='any',inplace=True)
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
yaxis1.hide();
|
yaxis1.hide();
|
||||||
yaxis2.hide();
|
yaxis2.hide();
|
||||||
plottype.hide();
|
plottype.hide();
|
||||||
reststrokes.hide();
|
// reststrokes.hide();
|
||||||
workmin.hide();
|
workmin.hide();
|
||||||
workmax.hide();
|
workmax.hide();
|
||||||
spmmin.hide();
|
spmmin.hide();
|
||||||
@@ -147,6 +147,7 @@
|
|||||||
yaxis1.show();
|
yaxis1.show();
|
||||||
plottype.show();
|
plottype.show();
|
||||||
piece.hide();
|
piece.hide();
|
||||||
|
reststrokes.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (functionfield.val() == 'cp') {
|
if (functionfield.val() == 'cp') {
|
||||||
|
|||||||
@@ -729,6 +729,7 @@ def comparisondata(workouts,options):
|
|||||||
res = interactive_multiple_compare_chart(ids,xparam,yparam1,
|
res = interactive_multiple_compare_chart(ids,xparam,yparam1,
|
||||||
promember=promember,
|
promember=promember,
|
||||||
plottype=plottype,
|
plottype=plottype,
|
||||||
|
workstrokesonly=workstrokesonly,
|
||||||
labeldict=labeldict)
|
labeldict=labeldict)
|
||||||
|
|
||||||
script = res[0]
|
script = res[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user