next version interactive plot
This commit is contained in:
@@ -426,12 +426,14 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
||||
work_max = forceanalysis.work_max
|
||||
notes = forceanalysis.notes
|
||||
name = forceanalysis.name
|
||||
plotcircles = forceanalysis.plotcircles
|
||||
plotlines = forceanalysis.plotlines
|
||||
includereststrokes = forceanalysis.include_rest_strokes
|
||||
except (ForceCurveAnalysis.DoesNotExist, ValueError):
|
||||
pass
|
||||
else:
|
||||
dist_min = 0
|
||||
dist_max = 0
|
||||
dist_max = row.distance
|
||||
spm_min = 15
|
||||
spm_max = 55
|
||||
work_min = 0
|
||||
@@ -439,6 +441,8 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
||||
notes = ''
|
||||
includereststrokes = False
|
||||
name = ''
|
||||
plotcircles = True
|
||||
plotlines = False
|
||||
|
||||
form = ForceCurveOptionsForm(initial={
|
||||
'spm_min': spm_min,
|
||||
@@ -449,6 +453,8 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
||||
'work_max': work_max,
|
||||
'notes': notes,
|
||||
'name': name,
|
||||
'plotcircles': plotcircles,
|
||||
'plotlines': plotlines,
|
||||
})
|
||||
|
||||
|
||||
@@ -463,6 +469,8 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
||||
work_max = form.cleaned_data['work_max']
|
||||
notes = form.cleaned_data['notes']
|
||||
name = form.cleaned_data['name']
|
||||
plotlines = form.cleaned_data['plotlines']
|
||||
plotcircles = form.cleaned_data['plotcircles']
|
||||
if not name:
|
||||
name = row.name
|
||||
includereststrokes = form.cleaned_data['includereststrokes']
|
||||
@@ -482,6 +490,8 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
||||
spm_min = spm_min,
|
||||
spm_max = spm_max,
|
||||
rower=row.user,
|
||||
plotlines = plotlines,
|
||||
plotcircles = plotcircles,
|
||||
include_rest_strokes = includereststrokes,
|
||||
)
|
||||
else:
|
||||
@@ -495,6 +505,8 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
||||
forceanalysis.work_max = work_max
|
||||
forceanalysis.spm_min = spm_min
|
||||
forceanalysis.spm_max = spm_max
|
||||
forceanalysis.plotcircles = plotcircles
|
||||
forceanalysis.plotlines = plotlines
|
||||
forceanalysis.include_rest_strokes = includereststrokes
|
||||
forceanalysis.save()
|
||||
dosave = True
|
||||
@@ -523,15 +535,7 @@ def workout_forcecurve_view(request, id=0, analysis=0, userid=0, workstrokesonly
|
||||
|
||||
|
||||
script, div = interactive_forcecurve(
|
||||
[row],
|
||||
workstrokesonly=workstrokesonly,
|
||||
dist_min = dist_min,
|
||||
dist_max = dist_max,
|
||||
spm_min = spm_min,
|
||||
spm_max = spm_max,
|
||||
work_min = work_min,
|
||||
work_max = work_max,
|
||||
notes=notes,
|
||||
[row]
|
||||
)
|
||||
|
||||
breadcrumbs = [
|
||||
|
||||
Reference in New Issue
Block a user