How to identify and update ColumnDataSource from external Javascript call?

I have an external jquery widget whose functionality I have not yet been able to replicate in bokeh. I would like to change a ColumnDataSource from the script that’s attached to the widget

What would be the right approach? Thanks

This example updates a data source from a JSCallback on a Bokeh widget, but you could use the same code from your own script:

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

Bryan

···

On Aug 13, 2015, at 12:05 PM, Pythonic <[email protected]> wrote:

I have an external jquery widget whose functionality I have not yet been able to replicate in bokeh. I would like to change a ColumnDataSource from the script that's attached to the widget

What would be the right approach? Thanks

--
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/daaec32c-b0d4-4414-9887-d7f844b3f5d6%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Follow up question:

Thanks to Bryan for the following heads up: “No, it’s a Backbone model, not a DOM element. There is an “index” of all the known Bokeh models on a page at Bokeh.index, you will have to dig through that looking for the ColumnDataSource that you are interested in.

Following this, my bokeh.index contains just 1 element, the main chart. Nested somewhere there, I presume there’s a columndatasource.

If I console.log this item I find a a very deep tree structure for the object, see image below.

I tried to explore but could not find any “source” element. As broad guidance, where should I look for this ColumnDataSource?

···

On Thursday, 13 August 2015 18:17:54 UTC+1, Bryan Van de ven wrote:

This example updates a data source from a JSCallback on a Bokeh widget, but you could use the same code from your own script:

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

Bryan

On Aug 13, 2015, at 12:05 PM, Pythonic [email protected] wrote:

I have an external jquery widget whose functionality I have not yet been able to replicate in bokeh. I would like to change a ColumnDataSource from the script that’s attached to the widget

What would be the right approach? Thanks


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/daaec32c-b0d4-4414-9887-d7f844b3f5d6%40continuum.io.

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