Bokeh 数据表中的多个格式化函数

Multiple formatter functions in Bokeh datatable

是否可以在一个 "formatter" 中做多种格式类型?例如:

TableColumn(field="y", title="y",formatter=HTMLTemplateFormatter(), NumberFormatter(),DateFormatter())

等等

不,这不可能。 Bokeh 目前只接受每个 TableColumn 一个 CellFormatter。您可以尝试在 Bokeh's Github 上打开一个问题,以允许 thge formatter 参数接受 CellFormatters 列表。或者,您可以考虑将 JS 或 python 回调连接到 TableColumn 以进行更复杂的格式化。

两年半后,但是……目前正在开发中。请密切关注 Bokeh 存储库以添加此功能,希望在不久的将来。