Skip to content
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

Jupyter notebook is not displaying charts inline. #2594

Closed
dove88 opened this issue Apr 21, 2022 · 5 comments
Closed

Jupyter notebook is not displaying charts inline. #2594

dove88 opened this issue Apr 21, 2022 · 5 comments
Labels

Comments

@dove88
Copy link

dove88 commented Apr 21, 2022

Hello, I am trying to render Altair charts in jupyter notebook, but I am getting only blank inline output.
I am using "alt.renderers.enable('notebook')" renderer option in my jupyter notebook.
'Mimetype' renderer is working fine in jupyter lab.

I have attached browser console for more details, kindly advise me to how can I solve the issue?

Altair version - 4.2.0
Vega version - 3.6.0
Jupyter notebook version - 6.4.10
ipykernel 6.4.1
ipython 8.2.0
ipywidgets 7.6.5
Browser Mozilla Firefox

Please do the needful
Thank you
IMG_20220421_201827

@dove88 dove88 added the bug label Apr 21, 2022
@joelostblom
Copy link
Contributor

joelostblom commented Apr 22, 2022

Does it work in the notebook with alt.renderers.enable('default')? If that doesn't work, there are some additional tips on this page in the docs that you can try out https://altair-viz.github.io/user_guide/troubleshooting.html. You could also try in another browser refine what is going wrong.

@joelostblom joelostblom added question and removed bug labels Apr 22, 2022
@dove88
Copy link
Author

dove88 commented Apr 22, 2022

@joelostblom

Hello, I have tried with Google Chrome first, then I shifted to Firefox, to check whether the case of browser issue. In both cases, it doesn't work. Infact I am using latest version of both browsers.
I did change, the renderer option to 'default' before I posted this thread and also gone through the display troubleshot website contents too.
Nothing worked till now.
I was using node 14 version, but yesterday I installed latest stable version for checking the compactibilty issue, however the issue remains the same.

This is for your info please.

I have vscode jupyter notebook and jupyterlab, the Mimetype is working fine in both these applications.

I think vega.js is not loading while executing python code?

@joelostblom
Copy link
Contributor

Hmmm, the only additional thing I can think of is if you have a browser addon that blocks the connection. I would try in a private/incognito window with all addons disabled. It is possible that this could be why you see blocked due to mimetype mismatch vega, but there might be other reasons. This seems to be more directly related to Vega and JupyterNotebooks so I would try asking in https://github.com/vega/ipyvega for more help

@dove88
Copy link
Author

dove88 commented Apr 22, 2022

You might be right...
I have gone through the link that you have provided in the reply, and this command,
'pip install jupyter pandas vega'.
Is it a separate installtion than my previous installtion of jupyter notebook, pandas, Vega?
Since I have installed all of these packages, do I need to install again with one line command?

@joelostblom
Copy link
Contributor

This error should not be related to your installation of those packages. I am closing this in favor of vega/ipyvega#412 since I am not sure if there is anything additional to add beyond what is mentioned there regarding the firewall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants