Private
Public Access
1
0

first version workouttype chart

This commit is contained in:
Sander Roosendaal
2020-05-09 15:12:32 +02:00
parent f3a62408e3
commit 95739145a9
3 changed files with 78 additions and 3 deletions

View File

@@ -4697,7 +4697,8 @@ def history_view(request,userid=0):
columns = ['hr','power','time']
tscript,tdiv = interactive_workouttype_piechart(g_workouts)
totalmeters,totalhours, totalminutes = get_totals(g_workouts)
totalminutes = "{totalminutes:02d}".format(totalminutes=totalminutes)
@@ -4768,6 +4769,8 @@ def history_view(request,userid=0):
return render(request,'history.html',
{
'tscript':tscript,
'tdiv':tdiv,
'rower':r,
'breadcrumbs':breadcrumbs,
'active':'nav-analysis',
@@ -4836,6 +4839,8 @@ def history_view_data(request,userid=0):
totalmeters,totalhours, totalminutes = get_totals(g_workouts)
totalminutes = "{totalminutes:02d}".format(totalminutes=totalminutes)
# meters, duration per workout type
wtypes = list(set([w.workouttype for w in g_workouts]))
@@ -4854,7 +4859,7 @@ def history_view_data(request,userid=0):
ddict['wtype'] = mytypes.workouttypes_ordered[wtype]
except KeyError:
ddict['wtype'] = wtype
ddict['id'] = wtype
ddict['distance'] = wmeters
ddict['duration'] = "{whours}:{wminutes:02d}".format(