{% extends "base.html" %} {% block title %}Category{% endblock %} {% block nav %}
  • home
  • people
  • categories
  • results
  • battle
  • {% endblock %} {% block onready %} var category_chart, category_point_chart; $(document).ready(function() { category_chart = new Highcharts.Chart({ chart: { renderTo: 'category_breakdown', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'Percentage of Workouts Done in Each Category' }, 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 Categories', data: [ {% for c in category_data %} ['{{ c.0 }}', {{ c.1 }}], {% endfor %} ] }] }); category_point_chart = new Highcharts.Chart({ chart: { renderTo: 'points_per_type', type: 'column' }, title: { text: 'Points per workout type' }, xAxis: { categories: [ {% for t in type_points %} "{{ t.workout_type }}", {% 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 t in type_points %} {{ t.points }}, {% endfor %} ] }] }); }); {% endblock %} {% block leaderBoard %}

    Select a category

    {% endblock %} {% block secondary %}
    {% endblock %}