Private
Public Access
1
0

done comparison chart

This commit is contained in:
Sander Roosendaal
2017-03-04 20:16:23 +01:00
parent 82efd308ba
commit 4ea452c2cb
3 changed files with 141 additions and 121 deletions

View File

@@ -1,4 +1,3 @@
from rowers.models import Workout, User, Rower, WorkoutForm,RowerForm,GraphImage
from rowingdata import rower as rrower
from rowingdata import main as rmain
@@ -1822,11 +1821,14 @@ def interactive_comparison_chart(id1=0,id2=0,xparam='distance',yparam='spm',
else:
rowdata2.sort_values(by='time',ascending=True,inplace=True)
x1 = rowdata1.ix[:,xparam]
x2 = rowdata2.ix[:,xparam]
try:
x1 = rowdata1.ix[:,xparam]
x2 = rowdata2.ix[:,xparam]
y1 = rowdata1.ix[:,yparam]
y2 = rowdata2.ix[:,yparam]
y1 = rowdata1.ix[:,yparam]
y2 = rowdata2.ix[:,yparam]
except KeyError:
return "","No valid Data Available"
x_axis_type = 'linear'
y_axis_type = 'linear'
@@ -1949,7 +1951,7 @@ def interactive_comparison_chart(id1=0,id2=0,xparam='distance',yparam='spm',
plot.title.text = row1.name+' vs '+row2.name
plot.title.text_font_size=value("1.2em")
plot.xaxis.axis_label = axlabels[xparam]
plot.yaxis.axis_label = axlabels[yparam]
if xparam == 'time':
plot.xaxis[0].formatter = DatetimeTickFormatter(