Private
Public Access
1
0

Merge branch 'release/v18.8.4'

This commit is contained in:
Sander Roosendaal
2022-10-31 21:43:50 +01:00
3 changed files with 6 additions and 2 deletions

View File

@@ -154,8 +154,8 @@ class InstrokeForm(forms.Form):
metric = forms.ChoiceField(label='metric',choices=(('a','a'),('b','b')))
individual_curves = forms.BooleanField(label='individual curves',initial=False,
required=False)
spm_min = forms.IntegerField(initial=15,label='SPM Min',widget=HiddenInput)
spm_max = forms.IntegerField(initial=45,label='SPM Max',widget=HiddenInput)
spm_min = forms.FloatField(initial=15,label='SPM Min',widget=HiddenInput)
spm_max = forms.FloatField(initial=45,label='SPM Max',widget=HiddenInput)
activeminutesmin = forms.FloatField(
required=False, initial=0, widget=forms.HiddenInput())
activeminutesmax = forms.FloatField(

View File

@@ -4318,6 +4318,9 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
df_pos = (df+abs(df))/2.
df_min = -(-df+abs(-df))/2.
if df.empty:
return "", "No data in selection"
mean_vals = df.median().replace(0, np.nan)
q75 = df_pos.quantile(q=0.75).replace(0,np.nan)
q25 = df_pos.quantile(q=0.25).replace(0,np.nan)

View File

@@ -62,6 +62,7 @@ $( function() {
range: true,
min: 0,
max: 60,
step: 0.1,
values: [ {{ spm_min }}, {{ spm_max }} ],
slide: function( event, ui ) {
$( "#amountspm" ).val(ui.values[ 0 ] + " - " + ui.values[ 1 ] );