Get TapTool to make selection on DataTable

Hello all looking for a little guidance on how to get the taptool to make a selection on a datatable. Below is the minimum code necessary to re-create the “problem”. As a disclaimer, I am an amateur scripter at best so it is very likely I am making a mistake.

When I execute the following code, selecting a row on the DataTable will select the corresponding glyph on the plot, is there a way to get the inverse of this behavior, i.e. when I select a glyph on the plot it bring where that point on the datatable into view and highlight it?

Any guidance someone can provide would be much appreciated.

from bokeh.plotting import figure, curdoc, ColumnDataSource
from bokeh.models import HoverTool, ResetTool, TapTool
from bokeh.models.widgets import DataTable, TableColumn
from bokeh.layouts import gridplot

data = {‘a’: [1,2,3,4,5,6,7,8,9,10], ‘b’: [11,12,13,14,15,16,17,18,19,20]}
source = ColumnDataSource(data)

tools=[HoverTool(), TapTool(), ResetTool()]

p1 = figure(plot_width=400,
x_axis_label=‘Example X’,
y_axis_label=‘Example Y’,


columns = [TableColumn(field=‘a’, title=‘A’),
TableColumn(field=‘b’, title=‘B’)]

t1 = DataTable(columns=columns,

layout = gridplot([[p1],[t1]])




This question doesn’t seem to be getting as much traction as some of the others so this update may not be necessary, but I got back around to working with this again today and made a ‘discovery’. When I stop the server, clicking a glyph on the plot will bring the selected point into view on the data table and highlight it; however, this breaks the ability to select a row on the DataTable and select that glyph on the plot. This seems odd to me.

If anyone can provide some guidance on what may be going on or point me to some reading that may assist, I’d greatly appreciate it.