I'm writing a circle plot for Bokeh that displays tooltips using the built-in hover tool. I'm working with a large number of points that overlap in some spots, often causing several tooltips to appear at once.
hover = HoverTool(
tooltips="""
<div>
<div>
<span style="font-size: 10px;">@names</span><br />
<span style="font-size: 10px;">@dates</span><br />
<span style="font-size: 10px; color: #696;">@x, @y</span>
</div>
</div>
""",
point_policy='snap_to_data'
)
TOOLS = ["resize, crosshair, pan, wheel_zoom, box_zoom, reset", hover]
# Initialize the graph
p = figure(tools=TOOLS, webgl=True, x_range=(-bound, bound), y_range=(0, bound), lod_timeout=1000, lod_factor = 10, lod_interval = 300, lod_threshold=10)
Displaying too many tooltips at once slows the application and runs off-screen. Is it possible to limit the number of tooltips rendered.