I have been trying to learn bokeh recently and in the course I want to clear few confusions as they have not been documented anywhere (or atleast I could not find it)
- What is JSON Prototypes for some classes in bokeh.models? What is it’s use? Is it restricted to just bokeh.models? Or more specifically to asubsect of bokeh.models’ classes? is there a exhaustive list of all classes which has a json prototype in the documentation somewhere?
- I wanted to write a customJS callback where I had passed my figure object as args dict, but when I try to access the yaxis object of the figure to change its label, i see an error of undefined in my browser console. In the documentation here callbacks — Bokeh 3.0.3 Documentation ,
how do I interpretate the ’ In particular those can be bokeh’s models. '. Does it means arg in customJS callback can only be python objects of bokeh.model classes? If yes, then why did not my error say wring argument for figure object instead it gave me an error only when I tried doing this ’ figure_obj.yaxis.axis_label=“new_lablel” ’ For the workaround I found that if I explicitly get a reference to yaxis axis object and then pass it as argument to custoimJS and access its attribute axis_lable, as ’ my_y_axes.axis_label =“new_label” ’ , this works fine as expected.
I would really appreciate if some one could help in clearing this for me. I have tried my best in explaining my problem/confusion, let me know if you need more details