Mouse pointer appearance, can I set a "busy"-pointer?

Hello,
I’m developing a web-app with bokeh server, where after some user interaction extensive calculations on the server have to be completed, before the displayed plots are finally updated.
Usually, applications indicate that to the (impatient) user by displaying a “busy” mouse pointer.

After extensive search on the web I was not able to find any hint, how to accomplish that within bokeh.

Hence, the question: Is it possible to change the mouse pointer appearance to “busy” and back in bokeh? And if so, is there a example I could follow?

Thanks in advance and stay healthy!
Thomas

There’s nothing built-in but it can be done by creating an overlay with cursor: progress. But even that is not that simple if you’re not willing to leave the constrained comfort of Bokeh. You can get some idea from this question and my answer to it: https://stackoverflow.com/q/60878836/564509

With that being said, maybe you don’t even need to change the cursor. I usually just put some label on top of the plot (like “Processing…”) and disable all interaction. It has an advantage of being visible on mobile devices where there’s no cursor.

1 Like

Another option is to use the accepted solution on this topic as a starting point. https://stackoverflow.com/questions/58502115/changing-cursor-on-a-bokeh-map

For the accepted solution to that question, I checked that using wait as the style.cursor property does indeed have an effect and yields a spinning wheel.

You’d need to come up with the state-machine and callbacks to suit your application.

1 Like

Thanks, for the suggestions and indicators for examples or approaches to adapt.
I will try _jm’s proposal first. I guess it’s possible to trigger the callbacks from python by change_value events in some hidden (boolean) checkbox, for example.

It may take some days until I find the time to try, though.
I’ll be back with my experience.