☰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

Client Side Callback

Community Supportbokehjs
seanoughton
seanoughton

I’m trying to implement a callback on the extra x_ranges and y_ranges of a plot.
The plot was created client side in javascript.
The code for creating the plot looks like this:

 var error_plot = Bokeh.Plotting.figure({
            plot_width: 800,
            plot_height: 600,
            title: seriesM + ': ' + interval + ': ' + metric,
            tools: "pan,box_zoom,reset,save",
            toolbar_location: "below",
            sizing_mode:"stretch_both",
            y_axis_label: metric,
            x_axis_label: "Horizons",
        });

In python I can create the callback like this:

plot.extra_x_ranges['logo_x_range'].js_on_change("start",CustomJS(args=dict(plot=self.plot),code=callback))

I do not see .js_on_change in the javascript API, or anything that works equivalently.

Are there any online resources that demonstrate how to do this?

Any help would be appreciated.

Thanks in advance

⌁   Link to post
Bryan
Bryan

@seanoughton I am afraid there simply isn’t as much yet. In the very early days, BokehJS was purely a hidden implementation detail, so there were no public docs at all. Over time it’s become more user-facing, and here has been some material added here and there, but it is not nearly as highly developed as “Python Bokeh” is in the area of documentation. We would very much like to make BokehJS a first-class project in its own right, with excellent docs and examples, but are also currently resource-limited and could really use more people helping with that goal.

⌁   Link to post

End of archived discussion · Replies are disabled