☰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

BoxSelectTool callback for end of selection event

Community Support
pavel-rev
pavel-rev

I am trying to figure out event to assign callback for BoxSelectTool. I want to press the tool, then after selection is done, the callback is executed. I do not want to assign callback to source, as I have a tap tool which will be affected. In other words:
box_selection_tool = p1.select(dict(type=BoxSelectTool))[0]
box_selection_tool.js_on_event(PressUp, callback_for_box_selection)

The help is quite confusing:

The end of the drag event indicates the selection region is ready.

⌁   Link to post
Bryan
Bryan

The “end of the selection” means when the the user completes a selection, at which point two things are available (via different means):

  • the selections indices of which points were inside the selection region
  • the geometry of the completed selection region

You’ll have to tell me which one you want for me to point you in the right direction.

⌁   Link to post

End of archived discussion · Replies are disabled