I don’t really have a clear idea what you are trying to accomplish. I will simply state:
Data tables only exist separately outside/next to plots
Range tools only exist/work inside plots
If you mean that your want a range tool inside some plot to update a data table outside that plot, then sure, you can add callbacks on the range to update anything you like. (Lots of interactive callback examples in the docs)
Solution 1 > Rangetool (could not be added as a glyph overlay on a table)
Solution 2> Hspan/Span indicating upper and lower bound (unable to select and drag the Hspan as customjs javascript eventKey modifier was not recognised by bokeh ).
Is there a way to create a span/rangetool widget on the table which is selectable manually draggable in real time?
Solution 2( eventKey modifier not recognised):
from bokeh.models import ColumnDataSource, Span, CustomJS, TapTool, PanTool
from bokeh.plotting import figure, show
from bokeh.layouts import column
import numpy as np
x = list(range(10))
y = [i * i for i in x]
source = ColumnDataSource({'x': x, 'y': y})
p = figure(width=400, height=300, tools="pan,wheel_zoom,reset", title="Shift+Drag HSpan")
p.line(x='x', y='y', source=source)
hspan = Span(location=50, dimension="width", line_width=2, line_color="red")
p.add_layout(hspan)
# JavaScript callback for dragging with Shift key
callback = CustomJS(args=dict(hspan=hspan), code="""
if (event.shiftKey) { // Check if Shift key is pressed
const y = cb_obj.y;
hspan.location = y;
}
""")
# Add TapTool and PanTool for interaction
tap_tool = TapTool(callback=callback)
pan_tool = PanTool()
p.add_tools(tap_tool, pan_tool)
layout = column(p)
show(layout)
There is no continuous selection available on data tables. There is only click followed by a separate shift-click too select an entire set of rows all at once.