H.phy
H.phy

Reputation: 13

slider text color change in bokeh lib

In bokeh lib slider, text_input, radio_button etc. are all white background and black text (default). I looked at the bokeh website and saw there line properties (line color, width, etc.), fill properties (fill color, alpha, etc.), text properties (font styles, colors, etc.)

My question is how can I change the fill color and text color (by using fill_color, text_color?)

Upvotes: 1

Views: 1202

Answers (1)

bigreddot
bigreddot

Reputation: 34628

Those properties only apply to things that are drawn on the plot canvas, i.e. glyphs and annotations. The widgets are DOM elements and by and large configurable using standard CSS rather than property attributes (i.e. you can embed a Bokeh document in a Jinja template that has CSS rules to style widget properties). However, if you are just interested in the bar color, that one in particular is configurable with the bar_color property, e.g

Slider(..., bar_color="red")

Upvotes: 1

Related Questions