busy / done events (to include things like trigger clips or other user interface events) are scheduled for one of the next two releases. (I hope that they will turn into 0.12.6 , but if they will not be in 0.12.7 .)
At the same time, it is best to use some kind of "dummy" model to launch a CustomJS . For example, you can add an invisible glyph and run CustomJS any property on it as a proxy server for a busy event. It is inconvenient but useful.
Here is a very crude example. The first warning will appear immediately. Close it, the following warning will appear after 5 seconds.
import time from bokeh.io import curdoc from bokeh.layouts import column from bokeh.models import Button, CustomJS from bokeh.plotting import figure p = figure() p.circle([1,2,3,4,5], [2,6,3,1,6]) dummy = p.circle([1], [2], alpha=0) dummy.glyph.js_on_change('size', CustomJS(code=""" alert(cb_obj.size.value) """)) b = Button() def cb(): dummy.glyph.size = 10 time.sleep(5) dummy.glyph.size = 20 b.on_click(cb) curdoc().add_root(column(b, p))
source share