散景sizing_mode =“ stretch_both”在台式机上可以正常工作,但在移动设备上什么也不显示

时间:2018-07-06 03:13:58

标签: bokeh

我网站上的此测试页在桌面浏览器上可以完美运行:http://parrystats.com/test

但是在Chrome或Safari上的iPhone 7上无法呈现任何内容。

我正在使用file_html来生成页面,并且无需进行任何修改即可将其放到服务器上。

source = ColumnDataSource(df[["team", "rush_margin", "pass_margin", "color"]])
hover = HoverTool(tooltips=[("team", "@team"), ("rush margin", "@rush_margin{0.00}"), ("pass margin", "@pass_margin{0.00}")], names=["scat"])
p = figure(plot_width=100, plot_height=100, tools=[hover, "pan", "wheel_zoom", "reset"], active_scroll="wheel_zoom", x_range=[-4, 4], y_range=[-5, 5], x_axis_label="Rush Margin", y_axis_label="Pass Margin", title="Passing Margin vs. Rushing Margin, CFB 2017", sizing_mode="stretch_both")
p.grid.visible = False
p.line(np.linspace(-100, 100), 0, color="#d3d3d3")
p.line(0, np.linspace(-100, 100), color="#d3d3d3")
p.xaxis.axis_line_color = None
p.yaxis.axis_line_color = None
p.outline_line_color = None
p.toolbar.logo = None
p.scatter("rush_margin", "pass_margin", color="color", size=15, source=source, name="scat")
show(p)
html = file_html(p, CDN, "Parry Stats")
with open("test.html", "w") as f:
    f.write(html)

我的手机上会显示所有其他尺寸调整模式,但同时会同时拉伸。有人遇到过这个吗?

0 个答案:

没有答案