☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Bokeh Widgets Update Method access from Javascript

Community Support
Martin_Guthrie
Martin_Guthrie

The documentation makes mention of a widget’s update method, for example,

image

I use flask and the components feature of bokeh to embed plots and widgets.

I find bokeh widgets by name in Javascript with,

            function getBokehElByName(name) {
                for (let i in Bokeh.index) {
                    bokeh = Bokeh.index[i];
                    var el = bokeh.model.document.get_model_by_name(name);
                    //console.log(bokeh, el);
                    if (!bokeh) {
                        continue;
                    }
                    if (el) {
                        return el;
                    }
                }
                return el;
            }

And then I try and modify some aspect of the widget, for example, a slider like this,

el.start = new_start;
el.end = new_end;

I have been using this architecture from ver 0.11! And it has served well.

However, I think modifying the widget in this way is not correct. I have tried to inspect and find the update method, but I can’t find or access it…

Q: Can I access the widget’s update method from Javascript?

⌁   Link to post

End of archived discussion · Replies are disabled