Private
Public Access
1
0

Merge branch 'release/v5.23'

This commit is contained in:
Sander Roosendaal
2017-12-01 12:04:59 +01:00
4 changed files with 21 additions and 14 deletions
+3 -4
View File
@@ -1557,7 +1557,6 @@ def getsmallrowdata_db(columns, ids=[], doclean=True, workstrokesonly=True):
# This doesn't work because sometimes data are duplicated at save # This doesn't work because sometimes data are duplicated at save
cdata2 = savgol_filter(cdata.values,windowsize,3) cdata2 = savgol_filter(cdata.values,windowsize,3)
print len(cdata),len(cdata2),'mies'
data[c] = cdata2 data[c] = cdata2
except KeyError: except KeyError:
data[c] = 0 data[c] = 0
@@ -1637,14 +1636,14 @@ def read_cols_df_sql(ids, columns, convertnewtons=True):
extracols = [] extracols = []
columns2 = list(columns)
for c in columns: for c in columns:
if not c in axx: if not c in axx:
columns.remove(c) columns2.remove(c)
extracols.append(c) extracols.append(c)
columns = list(columns2) + ['distance', 'spm', 'workoutid']
columns = list(columns) + ['distance', 'spm', 'workoutid']
columns = [x for x in columns if x != 'None'] columns = [x for x in columns if x != 'None']
columns = list(set(columns)) columns = list(set(columns))
cls = '' cls = ''
+16 -8
View File
@@ -2262,8 +2262,14 @@ def interactive_flex_chart2(id=0,promember=0,
plot.add_layout(y1means) plot.add_layout(y1means)
plot.add_layout(annolabel) plot.add_layout(annolabel)
try:
yaxlabel = axlabels[yparam1]
except KeyError:
yaxlabel = str(yparam1)+' '
y1label = Label(x=100,y=100,x_units='screen',y_units='screen', y1label = Label(x=100,y=100,x_units='screen',y_units='screen',
text=axlabels[yparam1]+": {y1mean:6.2f}".format(y1mean=y1mean), text=yaxlabel+": {y1mean:6.2f}".format(y1mean=y1mean),
background_fill_alpha=.7, background_fill_alpha=.7,
background_fill_color='white', background_fill_color='white',
text_color='blue', text_color='blue',
@@ -2278,25 +2284,27 @@ def interactive_flex_chart2(id=0,promember=0,
plot.line(xvals,yconstantpower,color="green",legend="Constant Power") plot.line(xvals,yconstantpower,color="green",legend="Constant Power")
if plottype=='line': if plottype=='line':
plot.line('x1','y1',source=source2,legend=axlabels[yparam1]) plot.line('x1','y1',source=source2,legend=yaxlabel)
elif plottype=='scatter': elif plottype=='scatter':
plot.scatter('x1','y1',source=source2,legend=axlabels[yparam1],fill_alpha=0.4, plot.scatter('x1','y1',source=source2,legend=yaxlabel,fill_alpha=0.4,
line_color=None) line_color=None)
plot.title.text = row.name plot.title.text = row.name
plot.title.text_font_size=value("1.0em") plot.title.text_font_size=value("1.0em")
plot.xaxis.axis_label = axlabels[xparam] plot.xaxis.axis_label = axlabels[xparam]
try:
yaxlabel = axlabels[yparam1]
except KeyError:
yaxlabel = yparam1
plot.yaxis.axis_label = yaxlabel plot.yaxis.axis_label = yaxlabel
yrange1 = Range1d(start=yaxminima[yparam1],end=yaxmaxima[yparam1]) try:
yrange1 = Range1d(start=yaxminima[yparam1],
end=yaxmaxima[yparam1])
except KeyError:
yrange1 = Range1d(start=rowdata[yparam1].min(),
end=rowdata[yparam1].max())
plot.y_range = yrange1 plot.y_range = yrange1
if (xparam != 'time') and (xparam != 'distance') and (xparam != 'cumdist'): if (xparam != 'time') and (xparam != 'distance') and (xparam != 'cumdist'):
+1 -1
View File
@@ -2,7 +2,7 @@
{% load staticfiles %} {% load staticfiles %}
{% load rowerfilters %} {% load rowerfilters %}
{% block title %}{{ workout.name }}Advanced {% endblock %} {% block title %}{{ workout.name }} Advanced {% endblock %}
{% block content %} {% block content %}
<div id="workouts" class="grid_6 alpha"> <div id="workouts" class="grid_6 alpha">
+1 -1
View File
@@ -2,7 +2,7 @@
{% load staticfiles %} {% load staticfiles %}
{% load rowerfilters %} {% load rowerfilters %}
{% block title %}{{ workout.name }}Advanced {% endblock %} {% block title %}{{ workout.name }} Advanced {% endblock %}
{% block content %} {% block content %}
<div id="workouts" class="grid_6 alpha"> <div id="workouts" class="grid_6 alpha">