first version workouttype chart
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user