Private
Public Access
1
0

activity chart on history page can be switched to rscore or trimp

This commit is contained in:
Sander Roosendaal
2020-08-23 17:36:17 +02:00
parent 9b9b1712a4
commit 568d3b0671
4 changed files with 37 additions and 7 deletions

View File

@@ -4695,12 +4695,15 @@ def history_view(request,userid=0):
if request.GET.get('workouttype'):
typeselect = request.GET.get('workouttype')
yaxis = request.GET.get('yaxis','duration')
if typeselect not in mytypes.checktypes:
typeselect = 'All'
form = HistorySelectForm(initial={'startdate':activity_startdate,
'enddate':activity_enddate,
'workouttype':typeselect})
'workouttype':typeselect,
'yaxis':yaxis})
@@ -4812,6 +4815,7 @@ def history_view(request,userid=0):
'lastyear':lastyear,
'today':today,
'workouttype':typeselect,
'yaxis':yaxis,
'firstmay':firstmay,
'sstartdate':sstartdate,
'senddate':senddate,
@@ -4844,6 +4848,7 @@ def history_view_data(request,userid=0):
if typeselect not in mytypes.checktypes:
typeselect = 'All'
yaxis = request.GET.get('yaxis','duration')
g_workouts = Workout.objects.filter(
user=r,
@@ -4929,7 +4934,7 @@ def history_view_data(request,userid=0):
totalsdict['nrworkouts'] = g_workouts.count()
# activity chart
activity_script, activity_div = interactive_activitychart2(g_workouts,startdate,enddate)
activity_script, activity_div = interactive_activitychart2(g_workouts,startdate,enddate,yaxis=yaxis)
# interactive hr pie chart
if typeselect == 'All':