y axis for pace chart
This commit is contained in:
@@ -947,6 +947,12 @@ def interactive_cum_flex_chart2(theworkouts,promember=0,
|
||||
|
||||
x_axis_type = 'linear'
|
||||
y_axis_type = 'linear'
|
||||
if xparam == 'time':
|
||||
x_axis_type = 'datetime'
|
||||
|
||||
if yparam1 == 'pace':
|
||||
y_axis_type = 'datetime'
|
||||
y1mean = datadf.ix[:,'pace'].mean()
|
||||
|
||||
datadf['xname'] = xparam
|
||||
datadf['yname1'] = yparam1
|
||||
@@ -1002,7 +1008,8 @@ def interactive_cum_flex_chart2(theworkouts,promember=0,
|
||||
text_color='blue',
|
||||
)
|
||||
|
||||
plot.add_layout(y1label)
|
||||
if yparam1 != 'time' and yparam1 != 'pace':
|
||||
plot.add_layout(y1label)
|
||||
|
||||
y2label = y1label
|
||||
plot.circle('x1','y1',source=source2,fill_alpha=0.3,line_color=None,
|
||||
@@ -1019,6 +1026,11 @@ def interactive_cum_flex_chart2(theworkouts,promember=0,
|
||||
xrange1 = Range1d(start=yaxminima[xparam],end=yaxmaxima[xparam])
|
||||
plot.x_range = xrange1
|
||||
|
||||
if yparam1 == 'pace':
|
||||
plot.yaxis[0].formatter = DatetimeTickFormatter(
|
||||
seconds = ["%S"],
|
||||
minutes = ["%M"]
|
||||
)
|
||||
|
||||
if yparam2 != 'None':
|
||||
yrange2 = Range1d(start=yaxminima[yparam2],end=yaxmaxima[yparam2])
|
||||
|
||||
Reference in New Issue
Block a user