Private
Public Access
1
0

show Flex Chart notes on Flex Chart page

This commit is contained in:
Sander Roosendaal
2017-10-25 17:44:06 +02:00
parent ae520e346f
commit 6a4eb4583c
4 changed files with 23 additions and 38 deletions

View File

@@ -577,32 +577,6 @@ def add_workout_from_strokedata(user,importid,data,strokedata,
timestr = strftime("%Y%m%d-%H%M%S")
# # auto smoothing
# pace = df[' Stroke500mPace (sec/500m)'].values
# velo = 500./pace
# f = df['TimeStamp (sec)'].diff().mean()
# windowsize = 2*(int(10./(f)))+1
# if windowsize <= 3:
# windowsize = 5
# df['originalvelo'] = velo
# if windowsize > 3 and windowsize < len(velo):
# velo2 = savgol_filter(velo,windowsize,3)
# else:
# velo2=velo
# velo3 = pd.Series(velo2)
# velo3 = velo3.replace([-np.inf,np.inf],np.nan)
# velo3 = velo3.fillna(method='ffill')
# pace2 = 500./abs(velo3)
# df[' Stroke500mPace (sec/500m)'] = pace2
# df = df.fillna(0)
# end autosmoothing
# Create CSV file name and save data to CSV file
csvfilename ='media/Import_'+str(importid)+'.csv'
@@ -623,12 +597,15 @@ def add_workout_from_strokedata(user,importid,data,strokedata,
totaldist = 0
totaltime = 0
id,message = dataprep.save_workout_database(csvfilename,r,
workouttype=workouttype,
title=title,notes=comments,
totaldist=totaldist,
totaltime=totaltime,
workoutsource=workoutsource)
id,message = dataprep.save_workout_database(
csvfilename,r,
workouttype=workouttype,
title=title,notes=comments,
totaldist=totaldist,
totaltime=totaltime,
workoutsource=workoutsource,
dosummary=True
)
@@ -6141,6 +6118,11 @@ def workout_flexchart3_view(request,*args,**kwargs):
else:
yparam2 = 'hr'
if favoritenr:
favoritechartnotes = favorites[favoritenr].notes
else:
favoritechartnotes = ''
if 'plottype' in kwargs:
plottype = kwargs['plottype']
else:
@@ -6225,6 +6207,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
'yparam1':yparam1,
'yparam2':yparam2,
'plottype':plottype,
'favoritechartnotes':favoritechartnotes,
'mayedit':mayedit,
'promember':promember,
'axchoicesbasic':axchoicesbasic,
@@ -6253,6 +6236,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
'plottype':plottype,
'axchoicesbasic':axchoicesbasic,
'axchoicespro':axchoicespro,
'favoritechartnotes':favoritechartnotes,
'noylist':noylist,
'mayedit':mayedit,
'promember':promember,