show Flex Chart notes on Flex Chart page
This commit is contained in:
@@ -651,11 +651,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
|||||||
|
|
||||||
if dosummary:
|
if dosummary:
|
||||||
summary = row.allstats()
|
summary = row.allstats()
|
||||||
#summary = row.summary()
|
|
||||||
#summary += '\n'
|
|
||||||
#summary += row.intervalstats()
|
|
||||||
|
|
||||||
#workoutstartdatetime = row.rowdatetime
|
|
||||||
timezone_str = 'UTC'
|
timezone_str = 'UTC'
|
||||||
try:
|
try:
|
||||||
workoutstartdatetime = timezone.make_aware(row.rowdatetime)
|
workoutstartdatetime = timezone.make_aware(row.rowdatetime)
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ dropping to 8m for race pace in the single.""",
|
|||||||
'yparam1':'driveenergy',
|
'yparam1':'driveenergy',
|
||||||
'yparam2':'None',
|
'yparam2':'None',
|
||||||
'xparam':'spm',
|
'xparam':'spm',
|
||||||
'plottype':'line',
|
'plottype':'scatter',
|
||||||
'workouttype':'ote',
|
'workouttype':'ote',
|
||||||
'reststrokes':True,
|
'reststrokes':True,
|
||||||
'notes':"""This chart shows the Work per Stroke versus Stroke Rate.
|
'notes':"""This chart shows the Work per Stroke versus Stroke Rate.
|
||||||
|
|||||||
@@ -189,7 +189,12 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart=0">></a>
|
<a class="button blue small" href="/rowers/workout/{{ id }}/flexchart?favoritechart=0">></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% if favoritechartnotes %}
|
||||||
|
<div class="grid_12 alpha">
|
||||||
|
<p>{{ favoritechartnotes }}</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -577,32 +577,6 @@ def add_workout_from_strokedata(user,importid,data,strokedata,
|
|||||||
|
|
||||||
timestr = strftime("%Y%m%d-%H%M%S")
|
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
|
# Create CSV file name and save data to CSV file
|
||||||
csvfilename ='media/Import_'+str(importid)+'.csv'
|
csvfilename ='media/Import_'+str(importid)+'.csv'
|
||||||
@@ -623,12 +597,15 @@ def add_workout_from_strokedata(user,importid,data,strokedata,
|
|||||||
totaldist = 0
|
totaldist = 0
|
||||||
totaltime = 0
|
totaltime = 0
|
||||||
|
|
||||||
id,message = dataprep.save_workout_database(csvfilename,r,
|
id,message = dataprep.save_workout_database(
|
||||||
workouttype=workouttype,
|
csvfilename,r,
|
||||||
title=title,notes=comments,
|
workouttype=workouttype,
|
||||||
totaldist=totaldist,
|
title=title,notes=comments,
|
||||||
totaltime=totaltime,
|
totaldist=totaldist,
|
||||||
workoutsource=workoutsource)
|
totaltime=totaltime,
|
||||||
|
workoutsource=workoutsource,
|
||||||
|
dosummary=True
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -6141,6 +6118,11 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
else:
|
else:
|
||||||
yparam2 = 'hr'
|
yparam2 = 'hr'
|
||||||
|
|
||||||
|
if favoritenr:
|
||||||
|
favoritechartnotes = favorites[favoritenr].notes
|
||||||
|
else:
|
||||||
|
favoritechartnotes = ''
|
||||||
|
|
||||||
if 'plottype' in kwargs:
|
if 'plottype' in kwargs:
|
||||||
plottype = kwargs['plottype']
|
plottype = kwargs['plottype']
|
||||||
else:
|
else:
|
||||||
@@ -6225,6 +6207,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
'yparam1':yparam1,
|
'yparam1':yparam1,
|
||||||
'yparam2':yparam2,
|
'yparam2':yparam2,
|
||||||
'plottype':plottype,
|
'plottype':plottype,
|
||||||
|
'favoritechartnotes':favoritechartnotes,
|
||||||
'mayedit':mayedit,
|
'mayedit':mayedit,
|
||||||
'promember':promember,
|
'promember':promember,
|
||||||
'axchoicesbasic':axchoicesbasic,
|
'axchoicesbasic':axchoicesbasic,
|
||||||
@@ -6253,6 +6236,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
'plottype':plottype,
|
'plottype':plottype,
|
||||||
'axchoicesbasic':axchoicesbasic,
|
'axchoicesbasic':axchoicesbasic,
|
||||||
'axchoicespro':axchoicespro,
|
'axchoicespro':axchoicespro,
|
||||||
|
'favoritechartnotes':favoritechartnotes,
|
||||||
'noylist':noylist,
|
'noylist':noylist,
|
||||||
'mayedit':mayedit,
|
'mayedit':mayedit,
|
||||||
'promember':promember,
|
'promember':promember,
|
||||||
|
|||||||
Reference in New Issue
Block a user