You need to name your glyph with the name=
attribute on the glyph that you are interested in having the hover tool active for and then set that name in the hover tool's names=
attribute. (Note the name=
attribute of the fig.line
glyph in the example below.
hover = HoverTool( mode='vline', line_policy='nearest', names=['ytd_ave'],
tooltips=[
("Week Number", "@WeekNumber"),
("OH for the Week", "@OverHead{0.00}%"),
("OH Average", "@AveOverHead{0.00}%"),
("Non-Controllable Hours", "@NonControllableHours{0.0}"),
("Controllable Hours", "@ControllableHours{0.0}"),
("Total Hours", "@TotalHours{0.0}"),
]
)
fig = Figure(title='Weekly Overhead', plot_width=950, plot_height=400,
x_minor_ticks=2, tools=['pan', 'box_zoom', 'wheel_zoom', 'save',
'reset', hover])
ch = fig.vbar('WeekNumber', top='ControllableHours', name='Over Head',
color='LightCoral', source=sources, width=.5)
nch = fig.vbar('WeekNumber', bottom='ControllableHours', top='TotalOHHours',
name='Non-Controllable Over Head', color='LightGray',
source=sources, width=.5)
bh = fig.vbar('WeekNumber', bottom='TotalOHHours', top='TotalHours',
name='Project Hours', color='LightGreen', source=sources,
width=.5)
ave = fig.line('WeekNumber', 'AveOverHead', source=sources, color='red',
y_range_name='Percent_OH', name='ytd_ave')