Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2017-12-01 09:56:15 +01:00
parent b0ca9418e5
commit 519effd8c2
2 changed files with 19 additions and 12 deletions

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
cdata2 = savgol_filter(cdata.values,windowsize,3)
print len(cdata),len(cdata2),'mies'
data[c] = cdata2
except KeyError:
data[c] = 0
@@ -1637,14 +1636,14 @@ def read_cols_df_sql(ids, columns, convertnewtons=True):
extracols = []
columns2 = list(columns)
for c in columns:
if not c in axx:
columns.remove(c)
columns2.remove(c)
extracols.append(c)
columns = list(columns) + ['distance', 'spm', 'workoutid']
columns = list(columns2) + ['distance', 'spm', 'workoutid']
columns = [x for x in columns if x != 'None']
columns = list(set(columns))
cls = ''

View File

@@ -2262,8 +2262,14 @@ def interactive_flex_chart2(id=0,promember=0,
plot.add_layout(y1means)
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',
text=axlabels[yparam1]+": {y1mean:6.2f}".format(y1mean=y1mean),
text=yaxlabel+": {y1mean:6.2f}".format(y1mean=y1mean),
background_fill_alpha=.7,
background_fill_color='white',
text_color='blue',
@@ -2278,25 +2284,27 @@ def interactive_flex_chart2(id=0,promember=0,
plot.line(xvals,yconstantpower,color="green",legend="Constant Power")
if plottype=='line':
plot.line('x1','y1',source=source2,legend=axlabels[yparam1])
plot.line('x1','y1',source=source2,legend=yaxlabel)
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)
plot.title.text = row.name
plot.title.text_font_size=value("1.0em")
plot.xaxis.axis_label = axlabels[xparam]
try:
yaxlabel = axlabels[yparam1]
except KeyError:
yaxlabel = yparam1
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
if (xparam != 'time') and (xparam != 'distance') and (xparam != 'cumdist'):