Altair: Altair 3.2 & Voila?

Created on 22 Aug 2019  路  3Comments  路  Source: altair-viz/altair

I'm trying to use altair 3.2.0 with Voila 0.1.9. I call:

alt.renderers.enable('notebook')

The ipynb file renders the Altair charts in Notebook 6.0.0 using Python 3.7.3 and ipyvega 2.5.

$ conda list
#
# Name                    Version                   Build  Channel
altair                    3.2.0                    py37_0    conda-forge
...
jupyter                   1.0.0                      py_2    conda-forge
jupyter_client            5.3.1                      py_0    conda-forge
jupyter_console           6.0.0                      py_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyter_server            0.1.1                    py37_0    conda-forge
jupyterlab                1.0.6                    py37_0    conda-forge
jupyterlab_pygments       0.1.0                      py_0    conda-forge
jupyterlab_server         1.0.6                      py_0    conda-forge
...
vega                      2.5.0                    py37_0    conda-forge
vega_datasets             0.7.0                      py_0    conda-forge
voila                     0.1.9                      py_1    conda-forge

However in voila 0.1.9, Altair charts output "JavaScript output is disabled in JupyterLab"

Note that I am certain that the vega nbextension is present and working in Voila because I also directly generate Vega descriptions from Python code for a treemap, and that treemap does appear:
Screen Shot 2019-08-22 at 9 18 58 AM

Can you provide guidance of what to look for? From https://github.com/ianozsvald/pylondinium2019/blob/master/simple_model_altair_widgets.ipynb and https://github.com/altair-viz/altair/issues/1564 it looks like people have gotten Altair to work within Voila, but I can't figure out what is wrong.

There are various messages in the JavaScript console, though none which look obviously like the problem. The warnings about Vega version might be my local code generating the Vega treemap.

Screen Shot 2019-08-22 at 9 25 56 AM

Most helpful comment

alt.renderers.enable('kaggle') appears to allow the Altair plots to render in Voila

All 3 comments

I don't know what Viola is, but if you're seeing that message then you probably should not be using the notebook renderer. See https://altair-viz.github.io/user_guide/troubleshooting.html#javascript-output-is-disabled-in-jupyterlab

Oh; from https://github.com/altair-viz/altair/issues/1564 I thought Voila was known and expected to work. I'll close this and followup elsewhere.

(Voila: https://blog.jupyter.org/and-voil%C3%A0-f6a2c08a4a93)

alt.renderers.enable('kaggle') appears to allow the Altair plots to render in Voila

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brylie picture brylie  路  4Comments

pabloinsente picture pabloinsente  路  3Comments

jtbaker picture jtbaker  路  3Comments

LukeMathWalker picture LukeMathWalker  路  3Comments

maxgerma picture maxgerma  路  3Comments