更改散景中滑块标题的 font-size

Changing font-size of slider title in bokeh

我正在尝试增加散景 (0.12.4) 中滑块标题的 font-size。对于任何其他 object 似乎有一个 "something_font_size" 属性,但据我所知这似乎不是滑块标题的情况,因为它被保存为一个字符串。有没有办法使用散景来做到这一点,或者我是否需要找到一种方法来使用 JavaScript 来修复它?

不确定是否可以使用散景修复此问题。 试试看哪些属性和方法可以应用于滑块对象。

如果失败,您可以通过调查 chrome/firefox 上的元素来更改它,然后将它们添加到 styles.css 文件或类似文件中。

 .bk-slider-parent
 {
  font-size:20px
 }

这似乎增加了名称和值的字体大小,您也可以只更改值字体 size/color 等...

让我补充一点,我是 运行 散景服务 --show Appdirectory

和 Appdirectory 包含 main.py、Templates/index.html 、Templates/styles.css - 因此您可以在任一文件 (styles.css 包含在 index.html)

已更新: 最低限度见下文 index.html 应如下所示:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Title</title>
        {{ bokeh_css }}
        {{ bokeh_js }}
    </head>
    <body>
        <div class="content">
            <h1>Title</h1>
            {{ plot_div|indent(8) }}
            {{ plot_script|indent(8) }}
        </div>
    </body>
</html>