简体   繁体   English

如何编辑Bokeh DataTable行高?

[英]How to edit Bokeh DataTable row height?

I currently have a Bokeh app written in python in directory format. 我目前有一个使用python以目录格式编写的Bokeh应用程序。

I am using Bokeh 's DataTable to display a bunch of raw text in one of the cells, and I cannot figure out how to get back into that CSS to change the default rowHeight . 我正在使用BokehDataTable在其中一个单元格中显示一堆原始文本,但我无法弄清楚如何返回该CSS来更改默认的rowHeight

I know the default slickgrid rowHeight is 25px , and that isn't enough. 我知道默认的slickgrid rowHeight25px ,这还不够。 Does anyone know how I can go about changing the default rowHeight as simply as possible, either in a CSS sheet, in the HTML, or from the python itself? 有谁知道我该如何尽可能简单地在CSS工作表,HTML中或从python本身更改默认的rowHeight

I do not need it to vary, just want to set it to be a certain pixel value. 我不需要改变它,只想将其设置为某个像素值即可。

I do not know if there is an easy way to change the rowHeight property of the SlickGrid. 我不知道是否有一种简单的方法来更改SlickGrid的rowHeight属性。 But if the problem is that you think the table is too small, you can simulate the zoom effect (in the whole table) with the CSS scale property : 但是,如果问题在于您认为表格太小,则可以使用CSS scale属性来模拟缩放效果(在整个表格中):

transform: scale(1.2);

Check this demo . 检查这个演示 And as it is explained here : 而且因为它是解释在这里

Don't forget to specify a transform origin to 0 0 so that the top/left of your element isn't cropped by the viewport. 不要忘记将转换原点指定为0 0这样视口就不会裁剪元素的顶部/左侧。

Anyway I believe the cells contents fit well in the table by default. 无论如何,我相信默认情况下单元格的内容非常适合该表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM