I am using LabelSet to display labels on a Bokeh map. I want to add background to the text to see correctly the labels (see the map below). I don’t know how to do it easily (I guess 2/3 ways: add box, custom JS and maybe something related to the label tile(?)).
Any experience in that particular point ?
By advance thank you
LabelSet models have background_fill_color and background_fill_alpha properties, which enable you to control the color of the labels’ background and the transparency, respectively.
These properties are vectorizable, in general, if you want to have different backgrounds and transparencies for the individual labels in the label set.
Here’s a quick example. Although the vectorizable syntax is illustrated through a ColumnDataSource, the same values are applied to all elements for simplicity.