hover on a different

Hi,
Is there a way to associate the HoverTool to a different ColumnDataSource and on the same figure? I am trying to update the second data source which Hover will work on, after a CustomJS callback after selecting a group of points.

In this case I want hover to only work on variable s2.

TOOLS = ‘box_zoom,box_select,crosshair,resize,reset’

p = figure(plot_width=400, plot_height=400, tools=TOOLS)

p.add_tools(HoverTool())

p.circle(‘DF.L1.C1’, ‘DF.L1.C2’, color=‘color’, size=4, source=s, alpha=0.4)

s2 = ColumnDataSource(data=dict())

p.circle(x=“DF.L1.C1”, y=“DF.L1.C2”, size=6, color=“black”, alpha=1.0, source=s2)

s.callback = CustomJS(args=dict(s2=s2), code="""

“”")

show(p)

thanks very much,

-Mark

Sorry for the late reply, but you can always specify the renderers
option to the hover tool, which is not quite the same as what you
asked but may be helpful.

s2_circles = p.circle(x="DF.L1.C1", y="DF.L1.C2", size=6,

color=“black”, alpha=1.0, source=s2)
p.add_tools(HoverTool(tooltips=None, renderers=[s2_circles]))

Hope that helps,

Bird
···

On 4/1/16 2:09 PM, wrote:

[email protected]

Hi,
Is there a way to associate the HoverTool to a different
ColumnDataSource and on the same figure? I am trying to
update the second data source which Hover will work on, after
a CustomJS callback after selecting a group of points.

In this case I want hover to only work on variable s2.

TOOLS = ‘box_zoom,box_select,crosshair,resize,reset’

p = figure(plot_width=400, plot_height=400, tools=TOOLS)

p.add_tools(HoverTool())

      p.circle('DF.L1.C1', 'DF.L1.C2', color='color', size=4,

source=s, alpha=0.4)

s2 = ColumnDataSource(data=dict())

        p.circle(x="DF.L1.C1", y="DF.L1.C2", size=6,

color=“black”, alpha=1.0, source=s2)

s.callback = CustomJS(args=dict(s2=s2), code=“”"

“”")

show(p)

thanks very much,

-Mark

  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/025a538a-7383-4be7-804f-e62b3e485910%40continuum.io?utm_medium=email&utm_source=footer)      .

For more options, visit .


Sarah Bird
Developer, Bokeh

    [
      ![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
    ](http://continuum.io)

https://groups.google.com/a/continuum.io/d/msgid/bokeh/025a538a-7383-4be7-804f-e62b3e485910%40continuum.io
https://groups.google.com/a/continuum.io/d/optout