Open jonc125 opened 6 years ago
I'm not 100% sure, because I don't know quite how Bokeh interacts with the server and hence where you can hook in. I'd need to poke around a bit!
One option is to have a paragraph in your template shown by default:
<p id='loading_message'>Loading result visualisations...</p>
and some Javascript code that either polls for a Bokeh div appearing, or (if Bokeh provides an event it can listen to) gets triggered by Bokeh, and calls $('#loading_message').hide()
(using jQuery for convenience). I have similar snippets in the Farid app that I could base something on.
You might be able to put the loading message inside <div class="bk-root">
and have Bokeh automatically replace it when it renders; I'd need to test if this works.
Currently adding <div class="bk-root">
in the template doesn't work as Bokeh adds another bk-root div instead of filling the existing one.
Is there any existing JS callback that Bokeh can fire so we can remove a loading div programatically?
Pity :(
How would you do that?