improved callout on trend flex
This commit is contained in:
@@ -403,6 +403,15 @@ def timedeltaconv(x):
|
||||
|
||||
return dt
|
||||
|
||||
def paceformatsecs(values):
|
||||
out = []
|
||||
for v in values:
|
||||
td = timedeltaconv(v)
|
||||
formattedv = strfdelta(td)
|
||||
out.append(formattedv)
|
||||
|
||||
return out
|
||||
|
||||
# Processes painsled CSV file to database
|
||||
def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
|
||||
dosummary=True,title='Workout',
|
||||
|
||||
@@ -1331,11 +1331,16 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
||||
hover = HoverTool(names=['data'],
|
||||
tooltips = [
|
||||
(groupby,'@groupval{1.1}'),
|
||||
(xparamname,'@x{1.1}'),
|
||||
(yparamname,'@y')
|
||||
])
|
||||
else:
|
||||
hover = HoverTool(names=['data'],
|
||||
tooltips = [
|
||||
(groupby,'@groupval'),
|
||||
(xparamname,'@x{1.1}'),
|
||||
(yparamname,'@y')
|
||||
,
|
||||
])
|
||||
|
||||
hover.mode = 'mouse'
|
||||
|
||||
@@ -3631,11 +3631,16 @@ def multiflex_view(request,userid=0,
|
||||
df = pd.DataFrame({
|
||||
xparam:xvalues,
|
||||
yparam:yvalues,
|
||||
'x':xvalues,
|
||||
'y':yvalues,
|
||||
'xerror':xerror,
|
||||
'yerror':yerror,
|
||||
'groupsize':groupsize,
|
||||
})
|
||||
|
||||
if yparam == 'pace':
|
||||
df['y'] = dataprep.paceformatsecs(df['y']/1.0e3)
|
||||
|
||||
aantal = len(df)
|
||||
|
||||
if groupby != 'date':
|
||||
|
||||
Reference in New Issue
Block a user