Bokeh Hovertool shows ???? when not on a circle glyph, but I want it to disappear

I am currently using a hovertool on one of my plots and whenever I hover over a circle glyph it shows the data that I want to see about the point in question. Whenever I take my cursor off the glyph, however, the hovertool shows me ???. Is it possible to have the hovertool information disappear when the cursor is NOT over any point (circle glyph)?

Can you provide concrete example code that reproduces this behavior?

Thanks,

Bryan

···

On Mar 19, 2017, at 20:19, [email protected] wrote:

I am currently using a hovertool on one of my plots and whenever I hover over a circle glyph it shows the data that I want to see about the point in question. Whenever I take my cursor off the glyph, however, the hovertool shows me ???. Is it possible to have the hovertool information disappear when the cursor is NOT over any point (circle glyph)?

--
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/67da468a-5013-4f31-9ebe-e88f2f89a557%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

source = ColumnDataSource(

	data = dict(

		lat = lat,

		lon = lon,

		radius = heat,

		prod = producer,

		constr = const,

		color = color,

		)

	)

TOOLS = 'box_zoom,wheel_zoom,hover,pan'

state_xs = [states[code]["lons"] for code in states]

state_ys = [states[code]["lats"] for code in states]

p = figure(title="Bound Portfolio", toolbar_location="left",

plot_width=1100, plot_height=700, tools = TOOLS)

p.patches(state_xs, state_ys, fill_alpha=0.3, fill_color = "orange",

line_color="#884444", line_width=2, line_alpha=0.3)

circle = Circle(x="lon", y="lat", size="radius", fill_color="color", fill_alpha=0.5, line_color=None)

#circle = Circle(x="lon", y="lat", size=4.5, fill_color="blue", fill_alpha=0.5, line_color=None)

p.add_glyph(source, circle)

p.background_fill_color = "blue"

p.background_fill_alpha = 0.2

p.axis.visible = False

hover = p.select_one(HoverTool)

hover.point_policy = "snap_to_data"

hover.tooltips = [

(“Producer”, “@prod”),

(“Construction”, “@constr”),

]

The above code is what I am working with. I want the hovertool to only show information when my cursor is above a circle glyph.

···

On Sunday, March 19, 2017 at 7:21:51 PM UTC-6, Bryan Van de ven wrote:

Can you provide concrete example code that reproduces this behavior?

Thanks,

Bryan

On Mar 19, 2017, at 20:19, [email protected] wrote:

I am currently using a hovertool on one of my plots and whenever I hover over a circle glyph it shows the data that I want to see about the point in question. Whenever I take my cursor off the glyph, however, the hovertool shows me ???. Is it possible to have the hovertool information disappear when the cursor is NOT over any point (circle glyph)?


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]ontinuum.io.

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/67da468a-5013-4f31-9ebe-e88f2f89a557%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.