Hi, I am failing to get the slider ‘mouseup’ or ‘throttle’ functionality to work using python callbacks.
Is this at all possible? anything wrong with the object’s initiation?
from bokeh.models.widgets import Slider
#notebook environment
from bokeh.io import show, output_notebook
output_notebook()
#Boeh server models
from bokeh.server.server import Server
from bokeh.application import Application
from bokeh.application.handlers.function import FunctionHandler
slider = Slider (start=0, end=100, value=0, step=1, title='slider', callback_policy = 'mouseup')
def callback (attr, old, new):
print ('callback')
def make_doc (doc):
slider.on_change('value', callback)
doc.add_root(slider)
#Bokeh server initiation and activation
handler = FunctionHandler(make_doc)
app = Application(handler)
server = Server(app, port=5000)
server.start()
show (app, 'localhost=5000')