Merge tag 'v3.40' into develop
bugfix and improvements multiflex
This commit is contained in:
@@ -321,11 +321,18 @@ grouplabels['workoutid'] = 'Workout'
|
||||
grouplabels.pop('None')
|
||||
grouplabels.pop('time')
|
||||
groupchoices = list(sorted(grouplabels.items(), key = lambda x:x[1]))
|
||||
formaxlabelsmultiflex = formaxlabels.copy()
|
||||
formaxlabelsmultiflex.pop('time')
|
||||
formaxlabelsmultiflex.pop('distance')
|
||||
parchoicesmultiflex = list(sorted(formaxlabelsmultiflex.items(), key = lambda x:x[1]))
|
||||
|
||||
|
||||
class MultiFlexChoiceForm(forms.Form):
|
||||
xparam = forms.ChoiceField(choices=parchoices,initial='spm',
|
||||
xparam = forms.ChoiceField(choices=parchoicesmultiflex,
|
||||
initial='spm',
|
||||
label='X axis')
|
||||
yparam = forms.ChoiceField(choices=parchoices,initial='power',
|
||||
yparam = forms.ChoiceField(choices=parchoicesmultiflex,
|
||||
initial='power',
|
||||
label='Y axis')
|
||||
groupby = forms.ChoiceField(choices=groupchoices,initial='date',
|
||||
label='Group By')
|
||||
|
||||
@@ -1173,9 +1173,14 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
||||
xparamname = axlabels[xparam]
|
||||
yparamname = axlabels[yparam]
|
||||
|
||||
|
||||
if xparam=='distance':
|
||||
xaxmax = datadf['x'].max()
|
||||
xaxmin = datadf['x'].min()
|
||||
xaxmax = datadf[xparam].max()
|
||||
xaxmin = datadf[xparam].min()
|
||||
elif xparam=='time':
|
||||
tseconds = datadf.ix[:,'time']
|
||||
xaxmax = tseconds.max()
|
||||
xaxmin = 0
|
||||
else:
|
||||
xaxmax = yaxmaxima[xparam]
|
||||
xaxmin = yaxminima[xparam]
|
||||
|
||||
@@ -110,9 +110,9 @@
|
||||
<div class="grid_2 omega">
|
||||
<p>
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<a class="button blue small" href="/rowers/user-multiflex-select">Multi Flex</a>
|
||||
<a class="button blue small" href="/rowers/user-multiflex-select">Trend Flex</a>
|
||||
{% else %}
|
||||
<a class="button blue small" href="/rowers/promembership">Multi Flex</a>
|
||||
<a class="button blue small" href="/rowers/promembership">Trend Flex</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user