首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >bokeh DataTable宽度

bokeh DataTable宽度
EN

Stack Overflow用户
提问于 2017-02-15 22:49:28
回答 1查看 4K关注 0票数 3

似乎bokeh DataTable有一个固定的整个表宽?

当我将列的宽度设置为很大时,它将无法工作。下面的代码有4列宽度= 1000,但它只显示4列的宽度要小得多。

此外,虽然我可以移动Chrome输出html中每个列的边界,但我不能用html移动表的右端--整个表的宽度似乎是固定的。

有办法有宽的桌子吗?

代码语言:javascript
复制
import bokeh.models.widgets as bmw

source = bokeh.models.ColumnDataSource(df)
numformatter = bmw.NumberFormatter()
numformatter.format = '0.00'
columns = [TableColumn(field=c, title=c, width = 1000, formatter=numformatter) for c in df]

table = bmw.DataTable(source=source, columns=columns, height = 1000)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-16 13:08:19

刚刚发现DataTable有一个属性width (没有文档说明)。所以

table = bmw.DataTable(source=source, columns=columns, height = 1000, width = 4000)

行得通

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42261593

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档