We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
Version: Bokeh 2.3.1, tested on Chrome and Safari (MacOS BigSur)
Problem: Python callback triggered by SelectionGeometry event is slow compared to js equivalent. This behaviour is present both for lasso_select and box_select.
Discussion about this topic exists here:
Note: Works fine with Bokeh 2.2.x
from bokeh.models import CustomJS
from bokeh.plotting import figure, output_notebook, show
from bokeh.events import SelectionGeometry
from bokeh.application import Application
from bokeh.application.handlers import FunctionHandler
import numpy as np
# Choose 'python' or 'js'
case = 'python'
N = 1000
img = np.empty((N,N), dtype=np.uint32)
view = img.view(dtype=np.uint8).reshape((N, N, 4))
for i in range(N):
for j in range(N):
view[i, j, 0] = int(i/N*255)
view[i, j, 1] = 158
view[i, j, 2] = int(j/N*255)
view[i, j, 3] = 255
plot = figure(tools="lasso_select, box_select, wheel_zoom")
plot.image_rgba(image=[img], x=0, y=0, dw=10, dh=10)
if case == 'python':
plot.on_event(SelectionGeometry, lambda x: None)
plot.js_on_event(SelectionGeometry, CustomJS(code=""" """))
handler = FunctionHandler(f)
app = Application(handler)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.