bokeh.models.callbacks¶
Client-side interactivity.
-
class
Callback(**kwargs)[source]¶ Bases:
bokeh.model.ModelBase class for interactive callback.
Callbackis generally not useful to instantiate on its own.
-
class
CustomJS(**kwargs)[source]¶ Bases:
bokeh.models.callbacks.CallbackExecute a JavaScript function.
-
args¶ property type:
Dict(String,Instance(Model) )A mapping of names to Bokeh plot objects. These objects are made available to the callback code snippet as the values of named parameters to the callback.
-
code¶ property type:
StringA snippet of JavaScript code to execute in the browser. The code is made into the body of a function, and all of of the named objects in
argsare available as parameters that the code can use. Additionally, acb_objparameter contains the object that triggered the callback and an optionalcb_dataparameter that contains any tool-specific data (i.e. mouse coordinates and hovered glyph indices for the HoverTool).Note
Use
CustomJS.from_coffeescript()for CoffeeScript source code.
-
-
class
OpenURL(**kwargs)[source]¶ Bases:
bokeh.models.callbacks.CallbackOpen a URL in a new tab or window (browser dependent).