☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Hover tool renderer level

Community Support
p-himik
p-himik

Well, it goes to show that it’s a hard problem - I could not reproduce it with this simple example:

from bokeh.io import show
from bokeh.layouts import gridplot
from bokeh.models import HoverTool
from bokeh.plotting import figure

ht = HoverTool(tooltips='<div style="width: 1000px; height: 1000px; background-color: teal;">Tooltip</div>')
p1 = figure(tools=[ht])
p2 = figure(tools=[ht])
p3 = figure(tools=[ht])
p4 = figure(tools=[ht])
for p in [p1, p2, p3, p4]:
    p.circle(x=[0, 1, 1, 0], y=[0, 0, 1, 1], size=100)

show(gridplot([[p1, p2], [p3, p4]]))
⌁   Link to post
_jm
_jm

Thanks for the quick feedback and illustrative example.

Perhaps your counter-example works because the models are all part of the same gridplot container. In my example, I have two roots (each a tab panel) that are sequentially added to a bokeh document, and it appears the second one is layered on top of the first.

I made modest modifications to your example to test that hypothesis, and can recreate the issue with the attached code (run as a bokeh server session). See also attached screen capture.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
"""

from bokeh.io import show
from bokeh.layouts import gridplot, column, row
from bokeh.models import HoverTool
from bokeh.plotting import figure, curdoc

ht = HoverTool(tooltips='<div style="width: 1000px; height: 1000px; background-color: teal;">Tooltip</div>')
p1 = figure(tools=[ht])
p2 = figure(tools=[ht])
p3 = figure(tools=[ht])
p4 = figure(tools=[ht])
for p in [p1, p2, p3, p4]:
    p.circle(x=[0, 1, 1, 0], y=[0, 0, 1, 1], size=100)

#show(gridplot([[p1, p2], [p3, p4]]))
curdoc().add_root(row(p1,p2))
curdoc().add_root(row(p3,p4))

⌁   Link to post
p-himik
p-himik

Ah, I see, thanks.

Well, then you have yourself a workaround already. :slight_smile: Just use gridplot, grid, or a combination of row and column to get the same layout you would get by calling add_root multiple times.

⌁   Link to post
_jm
_jm

The reason for sequential add_root calls in my current layout is that I am presenting information in tabs/panels and each root-level might not have the same panels/information in general.

I will think about how to reconfigure how I present information to a user.

Thanks again for continued help.

⌁   Link to post
p-himik
p-himik

To be honest, I don’t really understand how it precludes you from combining panels with the layout primitives. If you could elaborate, maybe with a toy example, I could maybe come up with some ideas.

⌁   Link to post
_jm
_jm

I think the disconnect might be a misunderstanding on my side. I assumed that tabs/panels could not be embedded in a grid, row, or column primitive. If that’s an incorrect assumption, then a workaround is straightforward.

Thanks

⌁   Link to post

End of archived discussion · Replies are disabled