moved some of form to chart
This commit is contained in:
@@ -1870,14 +1870,6 @@ class ForceCurveOptionsForm(forms.Form):
|
|||||||
|
|
||||||
notes = forms.CharField(initial="", label='notes', widget=HiddenInput, required=False)
|
notes = forms.CharField(initial="", label='notes', widget=HiddenInput, required=False)
|
||||||
|
|
||||||
plotchoices = (
|
|
||||||
('line', 'Force Curve Collection Plot'),
|
|
||||||
('scatter', 'Peak Force Scatter Plot'),
|
|
||||||
('none', 'Only aggregrate data')
|
|
||||||
)
|
|
||||||
plottype = forms.ChoiceField(choices=plotchoices, initial='line',
|
|
||||||
label='Individual Stroke Chart Type')
|
|
||||||
|
|
||||||
name = forms.CharField(initial="", label='Name',required=False)
|
name = forms.CharField(initial="", label='Name',required=False)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -534,7 +534,7 @@ def interactive_forcecurve(theworkouts, workstrokesonly=True, plottype='scatter'
|
|||||||
|
|
||||||
columns = ['catch', 'slip', 'wash', 'finish', 'averageforce',
|
columns = ['catch', 'slip', 'wash', 'finish', 'averageforce',
|
||||||
'peakforceangle', 'peakforce', 'spm', 'distance',
|
'peakforceangle', 'peakforce', 'spm', 'distance',
|
||||||
'workoutstate', 'driveenergy']
|
'workoutstate', 'driveenergy', 'cumdist']
|
||||||
|
|
||||||
rowdata = dataprep.getsmallrowdata_db(columns, ids=ids,
|
rowdata = dataprep.getsmallrowdata_db(columns, ids=ids,
|
||||||
workstrokesonly=workstrokesonly)
|
workstrokesonly=workstrokesonly)
|
||||||
|
|||||||
@@ -448,10 +448,8 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
|||||||
'work_min': work_min,
|
'work_min': work_min,
|
||||||
'work_max': work_max,
|
'work_max': work_max,
|
||||||
'notes': notes,
|
'notes': notes,
|
||||||
'plottype': 'line',
|
|
||||||
'name': name,
|
'name': name,
|
||||||
})
|
})
|
||||||
plottype = 'line'
|
|
||||||
|
|
||||||
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
@@ -468,7 +466,6 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
|||||||
if not name:
|
if not name:
|
||||||
name = row.name
|
name = row.name
|
||||||
includereststrokes = form.cleaned_data['includereststrokes']
|
includereststrokes = form.cleaned_data['includereststrokes']
|
||||||
plottype = form.cleaned_data['plottype']
|
|
||||||
workstrokesonly = not includereststrokes
|
workstrokesonly = not includereststrokes
|
||||||
|
|
||||||
if "_save" in request.POST and "new" not in request.POST: # pragma: no cover
|
if "_save" in request.POST and "new" not in request.POST: # pragma: no cover
|
||||||
@@ -523,13 +520,11 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
|||||||
|
|
||||||
else: # pragma: no cover
|
else: # pragma: no cover
|
||||||
workstrokesonly = True
|
workstrokesonly = True
|
||||||
plottype = 'line'
|
|
||||||
|
|
||||||
|
|
||||||
script, div = interactive_forcecurve(
|
script, div = interactive_forcecurve(
|
||||||
[row],
|
[row],
|
||||||
workstrokesonly=workstrokesonly,
|
workstrokesonly=workstrokesonly,
|
||||||
plottype=plottype,
|
|
||||||
dist_min = dist_min,
|
dist_min = dist_min,
|
||||||
dist_max = dist_max,
|
dist_max = dist_max,
|
||||||
spm_min = spm_min,
|
spm_min = spm_min,
|
||||||
|
|||||||
Reference in New Issue
Block a user