-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
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? Sign in to your account
Bokeh Support #112
Comments
I was about to open an issue and then I found this. We use See my minimal example: <!-- Configure and load Thebe !-->
<script type="text/x-thebe-config">
{
requestKernel: true,
binderOptions: {
repo: "python-adaptive/adaptive",
},
}
</script>
<script src="https://unpkg.com/[email protected]/lib/index.js"></script>
<button id="activateButton" style="width: 150px; height: 75px; font-size: 1.5em;">Activate</button>
<script>
var bootstrapThebe = function() {
thebelab.bootstrap();
}
document.querySelector("#activateButton").addEventListener('click', bootstrapThebe)
</script>
<pre data-executable="true" data-language="python">
import holoviews as hv
import numpy as np
hv.notebook_extension('bokeh')
xs = np.linspace(-1, 1)
ys = xs**2
hv.Curve((xs, ys))
</pre> |
This is just a mind dump of things I've been investigating. I just noticed that the error message seems to come from the source code here: https://github.com/jupyterlab/jupyterlab/blob/master/packages/rendermime/src/widgets.ts#L415 However, I'm not sure at all how or where the render function is being called. Bokeh.io imports 4 scripts into JupyterLab, but adding them directly to the HTML page doesn't work (I wasn't expecting them to though since we are calling output_notebook). However, I think importing one of them allows the bokeh icon to appear when it says "Loading BokehJS", but I don't think it's an overall solution to solve the underlying problem.
|
Hi, as an alternative to #111 it might be easier (I'm unsure) to support bokeh.
I tried forking launching a kernel based on the https://github.com/bokeh/bokeh-notebooks binder but get:
JavaScript output is disabled in JupyterLab
which I don't fully understand, since trying to render things in JupyterLab (by replacing /tree with /lab) in that binder works.
I tried forking it and explicitly adding the bokeh jupyterlab extension to the postBuild which successfully builds
https://github.com/lukasheinrich/bokeh-notebooks/blob/master/postBuild
but I still see the same message (
jupyter labextension list
seems to confirm the extension works)I see the example with ipyleaflet, which surely uses some javascript, but I don't know which piece I'm missing.
The text was updated successfully, but these errors were encountered: