Private
Public Access
1
0

Merge tag 'teamcomparetime' into develop

bugfix pace and time axes
This commit is contained in:
Sander Roosendaal
2017-02-19 18:05:35 +01:00
2 changed files with 18 additions and 11 deletions

View File

@@ -1591,6 +1591,7 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
'workoutid']
datadf = dataprep.getsmallrowdata_db(columns,ids=ids)
tseconds = datadf.ix[:,'time']
yparamname = axlabels[yparam]
@@ -1604,14 +1605,21 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
if xparam=='distance':
xaxmax = datadf['distance'].max()
xaxmin = datadf['distance'].min()
else:
if xparam != 'distance' and xparam != 'time' and xparam != 'cumdist':
xaxmax = yaxmaxima[xparam]
xaxmin = yaxminima[xparam]
elif xparam == 'time':
xaxmax = tseconds.max()
xaxmin = tseconds.min()
else:
xaxmax = datadf['distance'].max()
xaxmin = datadf['distance'].min()
yaxmin = yaxminima[yparam]
yaxmax = yaxmaxima[yparam]
x_axis_type = 'linear'
y_axis_type = 'linear'
@@ -1623,8 +1631,8 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
if yparam == 'pace':
y_axis_type = 'datetime'
yaxmax = 90.
yaxmin = 150.
yaxmax = 90.*1e3
yaxmin = 150.*1e3
if xparam == 'time':
x_axis_type = 'datetime'
@@ -1687,6 +1695,9 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
xrange1 = Range1d(start=yaxminima[xparam],end=yaxmaxima[xparam])
plot.x_range = xrange1
yrange1 = Range1d(start=yaxmin,end=yaxmax)
plot.y_range = yrange1
if xparam == 'time':
xrange1 = Range1d(start=xaxmin,end=xaxmax)
plot.x_range = xrange1

View File

@@ -6,10 +6,6 @@
{% block content %}
<script>
setTimeout("location.reload(true);",60000);
</script>
<div class="grid_12">