changed scaling behavior on all bokeh plots
This commit is contained in:
@@ -185,6 +185,7 @@ def interactive_boxchart(datadf,fieldname,extratitle=''):
|
||||
|
||||
yrange1 = Range1d(start=yaxminima[fieldname],end=yaxmaxima[fieldname])
|
||||
plot.y_range = yrange1
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.xaxis.axis_label = 'Date'
|
||||
plot.yaxis.axis_label = axlabels[fieldname]
|
||||
@@ -312,6 +313,7 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
|
||||
|
||||
p.legend.location = "top_left"
|
||||
p.legend.background_fill_alpha = 0.7
|
||||
p.sizing_mode = 'scale_width'
|
||||
|
||||
p.yaxis.axis_label = 'Minutes'
|
||||
|
||||
@@ -412,6 +414,7 @@ def interactive_forcecurve(theworkouts,workstrokesonly=False):
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],watermarkx,watermarky,
|
||||
watermarkw,watermarkh,
|
||||
@@ -800,6 +803,7 @@ def interactive_histoall(theworkouts):
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],watermarkx,watermarky,
|
||||
watermarkw,watermarkh,
|
||||
@@ -2052,6 +2056,7 @@ def interactive_windchart(id=0,promember=0):
|
||||
plot.xaxis.axis_label = "Distance (m)"
|
||||
plot.yaxis.axis_label = "Wind Speed (m/s)"
|
||||
plot.y_range = Range1d(-7,7)
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
|
||||
plot.extra_y_ranges = {"winddirection": Range1d(start=0,end=360)}
|
||||
@@ -2119,6 +2124,7 @@ def interactive_streamchart(id=0,promember=0):
|
||||
plot.xaxis.axis_label = "Distance (m)"
|
||||
plot.yaxis.axis_label = "River Current (m/s)"
|
||||
plot.y_range = Range1d(-2,2)
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
|
||||
script, div = components(plot)
|
||||
@@ -2188,6 +2194,7 @@ def interactive_chart(id=0,promember=0,intervaldata = {}):
|
||||
plot.line('time','pace',source=source,legend="Pace",name="pace")
|
||||
plot.title.text = row.name
|
||||
plot.title.text_font_size=value("1.0em")
|
||||
plot.sizing_mode = 'scale_width'
|
||||
plot.xaxis.axis_label = "Time"
|
||||
plot.yaxis.axis_label = "Pace (/500m)"
|
||||
plot.xaxis[0].formatter = DatetimeTickFormatter(
|
||||
@@ -2365,6 +2372,7 @@ def interactive_multiflex(datadf,xparam,yparam,groupby,extratitle='',
|
||||
|
||||
plot.title.text = title
|
||||
plot.title.text_font_size=value("1.0em")
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],watermarkx,watermarky,
|
||||
watermarkw,watermarkh,
|
||||
@@ -2590,6 +2598,7 @@ def interactive_cum_flex_chart2(theworkouts,promember=0,
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],watermarkx,watermarky,
|
||||
watermarkw,watermarkh,
|
||||
@@ -3005,6 +3014,7 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],watermarkx,watermarky,
|
||||
watermarkw,watermarkh,
|
||||
@@ -3498,6 +3508,7 @@ def thumbnail_flex_chart(rowdata,id=0,promember=0,
|
||||
|
||||
|
||||
|
||||
plot.sizing_mode = 'scale_width'
|
||||
plot.toolbar.logo = None
|
||||
plot.toolbar_location = None
|
||||
#plot.yaxis.visible = False
|
||||
@@ -3607,6 +3618,7 @@ def interactive_bar_chart(id=0,promember=0):
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],0.01,0.99,
|
||||
watermarkw,watermarkh,
|
||||
@@ -3774,6 +3786,7 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],0.05,0.9,
|
||||
watermarkw,watermarkh,
|
||||
@@ -4018,6 +4031,7 @@ def interactive_comparison_chart(id1=0,id2=0,xparam='distance',yparam='spm',
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],0.05,watermarky,
|
||||
watermarkw,watermarkh,
|
||||
@@ -4148,6 +4162,7 @@ def interactive_otw_advanced_pace_chart(id=0,promember=0):
|
||||
# add watermark
|
||||
plot.extra_y_ranges = {"watermark": watermarkrange}
|
||||
plot.extra_x_ranges = {"watermark": watermarkrange}
|
||||
plot.sizing_mode = 'scale_width'
|
||||
|
||||
plot.image_url([watermarkurl],watermarkx,watermarky,
|
||||
watermarkw,watermarkh,
|
||||
|
||||
Reference in New Issue
Block a user