diff --git a/rowers/dataprepnodjango.py b/rowers/dataprepnodjango.py index 4516ae54..493357d8 100644 --- a/rowers/dataprepnodjango.py +++ b/rowers/dataprepnodjango.py @@ -10,6 +10,7 @@ from rowingdata import make_cumvalues from rowingdata import rower as rrower from rowingdata import main as rmain from rowingdata import empower_bug_correction,get_empower_rigging +from rowingdata.csvparsers import make_cumvalues_array from time import strftime from pandas import DataFrame,Series diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 380088d6..80e02f70 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -15,6 +15,7 @@ from rowingdata import cumcpdata,histodata from rowingdata import rowingdata as rrdata from math import pi from django.utils import timezone +from rowingdata import make_cumvalues from bokeh.palettes import Dark2_8 as palette from bokeh.models.glyphs import MultiLine @@ -3096,7 +3097,9 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='', gr = groupname, ) - + if xparam == 'cumdist': + res = make_cumvalues(datadf[xparam]) + datadf[xparam] = res[0] if xparam=='distance': xaxmax = datadf[xparam].max() xaxmin = datadf[xparam].min() @@ -4657,6 +4660,7 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line', message = '' errormessage = '' + columns = [xparam,yparam, 'ftime','distance','fpace', 'power','hr','spm', @@ -4779,6 +4783,10 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line', group.sort_values(by='time',ascending=True,inplace=True) + + if xparam == 'cumdist': + res = make_cumvalues(group[xparam]) + group[xparam] = res[0] try: group['x'] = group[xparam] except KeyError: diff --git a/rowers/views/exportviews.py b/rowers/views/exportviews.py index dc83f46e..4de899e5 100644 --- a/rowers/views/exportviews.py +++ b/rowers/views/exportviews.py @@ -277,7 +277,7 @@ def workout_csvtoadmin_view(request,id=0): messages.info(request,successmessage) url = reverse('workout_view', kwargs = { - 'id':str(w.id), + 'id':encoder.encode_hex(w.id), }) response = HttpResponseRedirect(url)