How to change selection color of a DataTable?

Hi, I’m writing a Bokeh Server App (version 2.4.1).

I integrated a DataTable from which I can select rows. Based on this selection, points in another plot are selected with a python callback on the source.selected.indices. When selected, they are highlighted visually by defining selection_color="orange" in the call.

My problem is, that the default selection color of the DataTable (which is a light blue) is not really easy to see (compared to the configured circle plot). I’d like to change this to another color like orange.
Is there a way to have a parameter to DataTable() that changes the selection_color the same way as for the circle plot? Within the reference, I only found information on changing the background or text_color but nothing about the selection.

Many thanks in advance.

There is not currently any programmatic way to change this. The only way would be to target the underlying SlickGrid CSS (i.e. background-color for .slick-cell.selected). It seems like a reasonable feature ask so also feel free to open a GitHub Issue about adding API support for changing this.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.