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('None')
|
||||||
grouplabels.pop('time')
|
grouplabels.pop('time')
|
||||||
groupchoices = list(sorted(grouplabels.items(), key = lambda x:x[1]))
|
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):
|
class MultiFlexChoiceForm(forms.Form):
|
||||||
xparam = forms.ChoiceField(choices=parchoices,initial='spm',
|
xparam = forms.ChoiceField(choices=parchoicesmultiflex,
|
||||||
|
initial='spm',
|
||||||
label='X axis')
|
label='X axis')
|
||||||
yparam = forms.ChoiceField(choices=parchoices,initial='power',
|
yparam = forms.ChoiceField(choices=parchoicesmultiflex,
|
||||||
|
initial='power',
|
||||||
label='Y axis')
|
label='Y axis')
|
||||||
groupby = forms.ChoiceField(choices=groupchoices,initial='date',
|
groupby = forms.ChoiceField(choices=groupchoices,initial='date',
|
||||||
label='Group By')
|
label='Group By')
|
||||||
|
|||||||
@@ -1173,9 +1173,14 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
|||||||
xparamname = axlabels[xparam]
|
xparamname = axlabels[xparam]
|
||||||
yparamname = axlabels[yparam]
|
yparamname = axlabels[yparam]
|
||||||
|
|
||||||
|
|
||||||
if xparam=='distance':
|
if xparam=='distance':
|
||||||
xaxmax = datadf['x'].max()
|
xaxmax = datadf[xparam].max()
|
||||||
xaxmin = datadf['x'].min()
|
xaxmin = datadf[xparam].min()
|
||||||
|
elif xparam=='time':
|
||||||
|
tseconds = datadf.ix[:,'time']
|
||||||
|
xaxmax = tseconds.max()
|
||||||
|
xaxmin = 0
|
||||||
else:
|
else:
|
||||||
xaxmax = yaxmaxima[xparam]
|
xaxmax = yaxmaxima[xparam]
|
||||||
xaxmin = yaxminima[xparam]
|
xaxmin = yaxminima[xparam]
|
||||||
|
|||||||
@@ -110,9 +110,9 @@
|
|||||||
<div class="grid_2 omega">
|
<div class="grid_2 omega">
|
||||||
<p>
|
<p>
|
||||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
{% 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 %}
|
{% else %}
|
||||||
<a class="button blue small" href="/rowers/promembership">Multi Flex</a>
|
<a class="button blue small" href="/rowers/promembership">Trend Flex</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user