Objective: To learn how to change the background color of Bokeh tooltip in Python.
Below is the code that works for me, but I cannot seem to adjust the color within the tooltip (currently this produces only a white background for the tooltip/hover):
# Sometimes Bokeh is to verbose
import warnings
warnings.filterwarnings('ignore')
# Develop a histogram
from bokeh.charts import Bar, output_file, show
# Information contained within the hoover
tooltips=[
('Age', '@Age'),
('Count', '@height{0,000}')
]
colormap = {'Age':'gray'}
colors = colormap
from bokeh.palettes import brewer
#palette = brewer["Blues"][3]
# Create chart
p = Bar(data, 'Age', values='Age', title="Hep-C Age",xlabel="Age", ylabel="Number of Observations",
agg='count',
tooltips=tooltips, legend=False,plot_width=600, plot_height=400,
tools="lasso_select,box_select,tap,box_zoom,reset,save", active_drag="lasso_select",
toolbar_location="above",color="gray",title_text_font_size='14pt',title_text_color="gray")