Hello everyone, first of all I would like to thank all of you especially friends taking care of Bokeh project; I have learned lots thanks to you all.
I am trying to write a call_back function (without JavaScript) in Bokeh Server. My current update function is currently working fine but I need to write an update function to be able to update more than one figures, glyphs and also labels; so I wonder whether it is possible to pass additional parameters to a usual update function:
The general update function I have found and am using is with this structure:
“”“def myupdate(attr, old, new):
lines for updating various attributes of figure, plot etc. “””
And the widget creation and linking lines of code are as follows:
“”" myselect = Select(title=“My Graph Title”, value=“MY COLUMN NAME_1”, options=list_of_my_column_names_to_be_passed)
myselect.on_change(“value”, myupdate)"""
Is it possible to add new parameters to update functions’ parameters? And if yes, how should I call this function later on? Please see question marks ? below to be able comment:
“”“def myupdate(attr, old, new, ?,?,?): #New parameters to be added to function
lines for updating various attributes of figure, plot etc. “””
And in on_change function linking line:
“”“myselect.on_change(“value”, myupdate(?,?,?,?,?,?)#New parameters to be passed to function with default attr, old,new values
“””
By the way, I do not know what to pass to these functions as (attr, old, new) values either.
I will deeply appreciate any of your comments and help.
Kind Regards.
Tansu B.