Private
Public Access
1
0

done comparison chart

This commit is contained in:
Sander Roosendaal
2017-03-04 20:16:23 +01:00
parent 82efd308ba
commit 4ea452c2cb
3 changed files with 141 additions and 121 deletions

View File

@@ -3253,6 +3253,10 @@ def workout_comparison_view(request,id1=0,id2=0,xparam='distance',yparam='spm'):
promember=promember)
script = res[0]
div = res[1]
axchoicesbasic = {ax[0]:ax[1] for ax in axes if ax[4]=='basic'}
axchoicespro = {ax[0]:ax[1] for ax in axes if ax[4]=='pro'}
noylist = ["time","distance"]
axchoicesbasic.pop("cumdist")
return render(request,
@@ -3260,6 +3264,9 @@ def workout_comparison_view(request,id1=0,id2=0,xparam='distance',yparam='spm'):
{'interactiveplot':script,
'the_div':div,
'id1':id1,
'id2':id2,
'axchoicesbasic':axchoicesbasic,
'axchoicespro':axchoicespro,
'noylist':noylist,
'xparam':xparam,
'yparam':yparam,
@@ -3283,12 +3290,33 @@ def workout_comparison_view2(request,id1=0,id2=0,xparam='distance',
promember=promember,plottype=plottype)
script = res[0]
div = res[1]
axchoicesbasic = {ax[0]:ax[1] for ax in axes if ax[4]=='basic'}
axchoicespro = {ax[0]:ax[1] for ax in axes if ax[4]=='pro'}
noylist = ["time","distance"]
axchoicesbasic.pop("cumdist")
row1 = Workout.objects.get(id=id1)
row2 = Workout.objects.get(id=id2)
if row1.workouttype != 'water' or row2.workouttype != 'water':
axchoicespro.pop('slip')
axchoicespro.pop('wash')
axchoicespro.pop('catch')
axchoicespro.pop('finish')
axchoicespro.pop('totalangle')
axchoicespro.pop('effectiveangle')
axchoicespro.pop('peakforceangle')
return render(request,
'comparisonchart2.html',
{'interactiveplot':script,
'the_div':div,
'id1':id1,
'id2':id2,
'axchoicesbasic':axchoicesbasic,
'axchoicespro':axchoicespro,
'noylist':noylist,
'xparam':xparam,
'yparam':yparam,