percentage is default on zones chart
This commit is contained in:
@@ -76,7 +76,7 @@ class TrainingZonesForm(forms.Form):
|
||||
|
||||
zones = forms.ChoiceField(initial='hr',label='Training Zones',choices=zoneschoices)
|
||||
dates = forms.ChoiceField(initial='week',label='Date Aggregation', choices=datechoices)
|
||||
yaxis = forms.ChoiceField(initial='time',label='Y axis',choices=yaxischoices)
|
||||
yaxis = forms.ChoiceField(initial='percentage',label='Y axis',choices=yaxischoices)
|
||||
startdate = forms.DateField(
|
||||
initial=timezone.now()-datetime.timedelta(days=42),
|
||||
widget=AdminDateWidget(), #format='%Y-%m-%d'),
|
||||
|
||||
@@ -6585,6 +6585,7 @@ def interactive_otw_advanced_pace_chart(id=0,promember=0):
|
||||
|
||||
def get_zones_report(rower,startdate,enddate,trainingzones='hr',date_agg='week',
|
||||
yaxis='time'):
|
||||
|
||||
duration = enddate-startdate
|
||||
|
||||
totaldays = duration.total_seconds()/(24*3600)
|
||||
@@ -6595,6 +6596,8 @@ def get_zones_report(rower,startdate,enddate,trainingzones='hr',date_agg='week',
|
||||
hours = []
|
||||
zones = []
|
||||
|
||||
enddate = enddate + datetime.timedelta(days=1)
|
||||
|
||||
|
||||
workouts = Workout.objects.filter(
|
||||
user=rower,
|
||||
|
||||
@@ -1064,7 +1064,7 @@ def trainingzones_view(request,userid=0):
|
||||
startdate = enddate-datetime.timedelta(days=42)
|
||||
zones = 'hr'
|
||||
date_agg = 'week'
|
||||
yaxis = 'time'
|
||||
yaxis = 'percentage'
|
||||
|
||||
|
||||
form = TrainingZonesForm({
|
||||
@@ -1137,7 +1137,7 @@ def trainingzones_view_data(request,userid=0):
|
||||
enddate = timezone.now()
|
||||
zones = 'hr'
|
||||
date_agg = 'week'
|
||||
yaxis = 'time'
|
||||
yaxis = 'percentage'
|
||||
|
||||
zones = request.GET.get('zones',zones)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user