using event attribute in CustomJS callback

I have used bokeh to create an html file with two plots. I want the second plot to respond to a double click on the first plot using the x-axis value of the location of the double click. Is there a simple way to accomplish this? My knowledge of JavaScript is very limited. Thank you!

Hi,

It's often possible to achieve sophisticated linked behavior in only a few (<10) lines of JS. I'd suggest studying the examples here:

  http://bokeh.pydata.org/en/latest/docs/user_guide/interaction/callbacks.html#userguide-interaction-jscallbacks

To get some ideas, and be able to formulate more concrete questions based on your particular use case.

Thanks,

Bryan

···

On Oct 25, 2017, at 09:04, nsp <[email protected]> wrote:

I have used bokeh to create an html file with two plots. I want the second plot to respond to a double click on the first plot using the x-axis value of the location of the double click. Is there a simple way to accomplish this? My knowledge of JavaScript is very limited. Thank you!

--
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/ec77843c-335d-4d16-be63-956e53529de2%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Was able to do it by following the examples in the link posted by Bryan!

···

On Wednesday, October 25, 2017 at 5:46:39 PM UTC+2, Bryan Van de ven wrote:

Hi,

It’s often possible to achieve sophisticated linked behavior in only a few (<10) lines of JS. I’d suggest studying the examples here:

    [http://bokeh.pydata.org/en/latest/docs/user_guide/interaction/callbacks.html#userguide-interaction-jscallbacks](http://bokeh.pydata.org/en/latest/docs/user_guide/interaction/callbacks.html#userguide-interaction-jscallbacks)

To get some ideas, and be able to formulate more concrete questions based on your particular use case.

Thanks,

Bryan

On Oct 25, 2017, at 09:04, nsp [email protected] wrote:

I have used bokeh to create an html file with two plots. I want the second plot to respond to a double click on the first plot using the x-axis value of the location of the double click. Is there a simple way to accomplish this? My knowledge of JavaScript is very limited. Thank you!


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/ec77843c-335d-4d16-be63-956e53529de2%40continuum.io.

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