{% extends "base.html" %} {% block title %}{{ workout_type.name }}{% endblock %} {% block nav %}
  • home
  • people
  • categories
  • results
  • battle
  • {% endblock %} {% block back %}Back {% endblock %} {% block onready %} var points_per_person_chart; var distance_duration_per_person_chart; var average_distance_duration_per_person_chart; var workouts_by_month_chart; var workouts_by_week_chart; var felt_chart; $(document).ready(function() { points_per_person_chart = new Highcharts.Chart({ chart: { renderTo: 'points_per_person', type: 'column' }, title: { text: 'Points per person' }, xAxis: { categories: [ {% for data in points_per_person %} "{{ data.friend.first_name }} {{ data.friend.last_name }}", {% endfor %} ], labels: { rotation: -45, align: 'right' } }, yAxis: { min: 0, title: { text: 'Points' } }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -100, y: 100, floating: true, borderWidth: 1, backgroundColor: Highcharts.theme.legendBackgroundColor || '#FFFFFF', shadow: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [{ name: 'Points', data: [ {% for data in points_per_person %} {{ data.points }}, {% endfor %} ] }] }); distance_duration_per_person_chart = new Highcharts.Chart({ chart: { renderTo: 'distance_duration_per_person', type: 'column' }, title: { {% if workout_type.type == 'Duration' %} text: 'Minutes Logged Per Person' {% else %} text: 'Miles Logged Per Person' {% endif %} }, xAxis: { categories: [ {% for data in distance_duration_per_person %} {% if data.value > 0 %} "{{ data.friend.first_name }} {{ data.friend.last_name }}", {% endif %} {% endfor %} ], labels: { rotation: -45, align: 'right' } }, yAxis: { min: 0, title: { {% if workout_type.type == 'Duration' %} text: 'Minutes' {% else %} text: 'Miles' {% endif %} } }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -100, y: 100, floating: true, borderWidth: 1, backgroundColor: Highcharts.theme.legendBackgroundColor || '#FFFFFF', shadow: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [{ {% if workout_type.type == 'Duration' %} name: 'Minutes', {% else %} name: 'Miles', {% endif %} data: [ {% for data in distance_duration_per_person %} {% if data.value > 0 %} {{ data.value|floatformat }}, {% endif %} {% endfor %} ] }] }); average_distance_duration_per_person_chart = new Highcharts.Chart({ chart: { renderTo: 'average_distance_duration_per_person', type: 'column' }, title: { {% if workout_type.type == 'Duration' %} text: 'Average Minutes Logged Per Person' {% else %} text: 'Average Miles Logged Per Person' {% endif %} }, xAxis: { categories: [ {% for data in distance_duration_per_person %} {% if data.average > 0 %} "{{ data.friend.first_name }} {{ data.friend.last_name }}", {% endif %} {% endfor %} ], labels: { rotation: -45, align: 'right' } }, yAxis: { min: 0, title: { {% if workout_type.type == 'Duration' %} text: 'Minutes' {% else %} text: 'Miles' {% endif %} } }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -100, y: 100, floating: true, borderWidth: 1, backgroundColor: Highcharts.theme.legendBackgroundColor || '#FFFFFF', shadow: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [{ {% if workout_type.type == 'Duration' %} name: 'Minutes', {% else %} name: 'Miles', {% endif %} data: [ {% for data in distance_duration_per_person %} {% if data.average > 0 %} {{ data.average|floatformat }}, {% endif %} {% endfor %} ] }] }); workouts_by_week_chart = new Highcharts.Chart({ chart: { renderTo: 'workouts_by_week', type: 'column' }, title: { text: 'Frequency of Workouts by Day of Week' }, xAxis: { categories: [ {% for key, value in workouts_by_week.items %} "{{ key }}", {% endfor %} ], labels: { rotation: -45, align: 'right' } }, yAxis: { min: 0, title: { text: 'Frequency' } }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -100, y: 100, floating: true, borderWidth: 1, backgroundColor: Highcharts.theme.legendBackgroundColor || '#FFFFFF', shadow: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [{ name: 'Workouts', data: [ {% for key, value in workouts_by_week.items %} {{ value }}, {% endfor %} ] }] }); workouts_by_month_chart = new Highcharts.Chart({ chart: { renderTo: 'workouts_by_month', type: 'column' }, title: { text: 'Frequency of Workouts by Month' }, xAxis: { categories: [ {% for w in workouts_by_month %} "{{ w.0 }}", {% endfor %} ], labels: { rotation: -45, align: 'right' } }, yAxis: { min: 0, title: { text: 'Frequency' } }, legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: -100, y: 100, floating: true, borderWidth: 1, backgroundColor: Highcharts.theme.legendBackgroundColor || '#FFFFFF', shadow: true }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [{ name: 'Workouts', data: [ {% for w in workouts_by_month %} {{ w.1 }}, {% endfor %} ] }] }); felt_chart = new Highcharts.Chart({ chart: { renderTo: 'felt_chart', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'How did you feel?' }, tooltip: { formatter: function() { return ''+ this.point.name +': '+ parseFloat(this.percentage).toFixed(2) +' %'; } }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, color: '#000000', connectorColor: '#000000', formatter: function() { return ''+ this.point.name +': '+ parseFloat(this.percentage).toFixed(2) +' %'; } } } }, series: [{ type: 'pie', name: 'Workout Types', data: [ {% for s in sentiment_data %} ['{{ s.0 }}', {{ s.1 }}], {% endfor %} ] }] }); }); {% endblock %} {% block leaderBoard %}

    {{ workout_type.name }}

    Quick Stats
    {% endblock %} {% block secondary %}
      {% for note in notes %}
    • {{ note }}
    • {% endfor %}
    {% endblock %}