Private
Public Access
1
0

fix quiske

This commit is contained in:
Sander Roosendaal
2022-10-31 19:09:50 +01:00
parent c34fac1b20
commit 9eb65f5b26
2 changed files with 9 additions and 3 deletions

View File

@@ -4209,7 +4209,7 @@ def forcecurve_multi_interactive_chart(selected):
return (script, div)
def instroke_multi_interactive_chart(selected, *args, **kwargs):
df_plot = pd.DataFrame()
ids = [analysis.id for analysis in selected]
metrics = list(set([analysis.metric for analysis in selected]))
@@ -4318,7 +4318,7 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
df_pos = (df+abs(df))/2.
df_min = -(-df+abs(-df))/2.
mean_vals = df.median()
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)
q75min = df_min.quantile(q=0.75).replace(0,np.nan)
@@ -4453,7 +4453,12 @@ def instroke_interactive_chart(df,metric, workout, spm_min, spm_max,
plot.add_tools(HoverTool(tooltips=TIPS))
script, div = components(plot)
try:
script, div = components(plot)
except ValueError:
script = ""
div = "Something went wrong with the chart"
return (script, div)

View File

@@ -89,6 +89,7 @@ $( function() {
range: true,
min: 0,
max: {{ maxminutes }},
step: 0.1,
values: [ {{ activeminutesmin }}, {{ activeminutesmax }} ],
slide: function( event, ui ) {
$( "#amount" ).val(ui.values[ 0 ] + " min - " + ui.values[ 1 ] + " min " );