Optional "tooltips"

This is my geography map:

This is my tooltips:

(“Name”, “@name”),
(y, “@sizes_ori”),
("(Long, Lat)", “($x, $y)”),

What are you trying to do?
When I add tooltips in my geography map, I want to only show Name and (long, lat) for the first situation, and only show num and (long, lat) for the second. But since they are in the same figure, I can only use one tooltips. In other word, I don’t want to show “???” if the attribute is missed.

Could anyone help me for this? Thanks!

You will need to add two separate HoverTool instance, with different separate tooltips, and also configure the renderers property of the tools to restrict each tool to one of the glyph renderers (by default, hover tools work on every available glyph)

1 Like