fix quiske
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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 " );
|
||||
|
||||
Reference in New Issue
Block a user