From cf47afe53839d3ffce18c765680eab2f9a21ab9f Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 6 May 2020 21:41:10 +0200 Subject: [PATCH] ajax call for history chart --- rowers/templates/history.html | 46 ++++++++++++++++++++++++++++++++--- rowers/views/analysisviews.py | 7 ++++-- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/rowers/templates/history.html b/rowers/templates/history.html index df5ca327..8f84dcfd 100644 --- a/rowers/templates/history.html +++ b/rowers/templates/history.html @@ -5,11 +5,23 @@ {% block title %}Rowsandall {% endblock %} {% block main %} +
+ + +
+
+ + +
+ + + +
+
    - - -
  • History for {{ rower.user.first_name }} {{ rower.user.last_name }}

  • @@ -62,7 +74,9 @@

  • -
    {{ totalscript|safe }}{{ totaldiv|safe }}
    +
    + {{ totaldiv|safe }} +
  • {% for ddict in typedicts %} @@ -103,6 +117,30 @@ {% endblock %} +{% block scripts %} + + + +{% endblock %} + {% block sidebar %} diff --git a/rowers/views/analysisviews.py b/rowers/views/analysisviews.py index eb065ac4..84e18a4f 100644 --- a/rowers/views/analysisviews.py +++ b/rowers/views/analysisviews.py @@ -4747,8 +4747,11 @@ def history_view(request,userid=0): # interactive hr pie chart + totalscript = '' + totaldiv = get_call() if typeselect == 'All': - totalscript,totaldiv = interactive_hr_piechart(df,r,'All Workouts') + pass + #totalscript,totaldiv = interactive_hr_piechart(df,r,'All Workouts') else: a_workouts = g_workouts.filter(workouttype=typeselect) ddf = getsmallrowdata_db(columns,ids=[w.id for w in a_workouts]) @@ -4758,7 +4761,7 @@ def history_view(request,userid=0): pass ddf = dataprep.clean_df_stats(ddf,workstrokesonly=True, ignoreadvanced=True) - totalscript, totaldiv = interactive_hr_piechart(ddf,r,mytypes.workouttypes_ordered[typeselect]) + #totalscript, totaldiv = interactive_hr_piechart(ddf,r,mytypes.workouttypes_ordered[typeselect]) # interactive power pie chart