I have a line plot with some circles plotted as well. The data is from different datasets, so the lines and the circles need to have different tooltips. At the very least, I’d like to have tooltips only for the circles, but not the line.
I found this:
opened 06:43PM - 07 Aug 14 UTC
closed 05:22AM - 07 Dec 14 UTC
type: bug
reso: duplicate
tag: component: docs
When using a HoverTool in a Plot with several Glyphs, how can you (or can you?) … specify to just hover over one of the Glyphs?
Right now, if I have Patches + Circles that overlay, the circle doesn't get the hover box displayed just the Patch, if there is no Patch (e.g. in a map, the sea), then the circle does get the hover box displayed.
e.g.:
![screen shot 2014-08-07 at 1 20 50 pm](https://cloud.githubusercontent.com/assets/4940549/3846840/4f7bff76-1e60-11e4-907f-7eb6bc5cb23f.png)
![screen shot 2014-08-07 at 1 21 05 pm](https://cloud.githubusercontent.com/assets/4940549/3846839/4f7971de-1e60-11e4-9e9d-30113ef33333.png)
If just one of the Glyphs has the variable in the HoverTool (e.g. Circles source has `name`, Patches source doesn't), then you still get this:
![screen shot 2014-08-07 at 1 39 36 pm](https://cloud.githubusercontent.com/assets/4940549/3847074/3acb7a46-1e62-11e4-97be-7e155bde2835.png)
Ideas:
-In case of several Glyphs, if one doesn't have the variables name in its source, then HoverTool doesn't apply to that Glyph?
or,
-Be able to assign Hover to a particular Glyph?
but the fixes seem kludgy and outdated. Is there an official way to do this right now? Does anyone have some examples?
Hi Chris,
You can reference the glyph renderer when you add your tool.
You’ll probly do something like:
circle = Circle(…)
circle_renderer = p.add_glyph(source, circle)
p.add_tool(HoverTool(renderers=[circle_renderer]))
Hope this helps,
Bird
···
On Fri, May 22, 2015 at 2:01 PM, Chris Lindner [email protected] wrote:
I have a line plot with some circles plotted as well. The data is from different datasets, so the lines and the circles need to have different tooltips. At the very least, I’d like to have tooltips only for the circles, but not the line.
I found this:
https://github.com/bokeh/bokeh/issues/975
but the fixes seem kludgy and outdated. Is there an official way to do this right now? Does anyone have some examples?
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] .
To post to this group, send email to [email protected] .
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f5396199-259e-4d25-a371-17b9f089e7b7%40continuum.io .
For more options, visit https://groups.google.com/a/continuum.io/d/optout .