1
votes

I am using bokeh to embed a chart into an html template served by flask. I am using the autoload server method which returns a script which is then embedded into the html by the template renderer.

What I would like to do next is update the plot via a ajax type request, via a button click on hte same page, without necessarily having to replace the whole script which came along the first time the page loaded. It seems like it should be possible to just update the plot id or something similar so that the chart changes but without the brute force of replacing the whole script each time. Is this possible and how would it be done?

Thanks!

1

1 Answers

2
votes

Hi this is currently possible, but difficult. We are currently working on a PR:

https://github.com/ContinuumIO/bokeh/pull/1274

that will be merged in the next few days (today's date: 2014.10.19) that will make things easier. It adds a "Bokeh.index" that contains all the top level objects, so that you can reach in and grab the data sources more easily and update them. Then there is a follow on PR to create an example just like you describe:

https://github.com/ContinuumIO/bokeh/pull/911

It may be a few weeks before I have time to finish that one, I would suggest subscribing to the issue on GH so you can be updated when it is ready.