-
Notifications
You must be signed in to change notification settings - Fork 795
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
Understanding mismatch between Jupyter-rendered chart and HTML exported version #3712
Comments
Do you see this behavior without the vegafusion transformer enabled? There are some minor differences in how vegafusion handles |
TLDR: no, I do not see the behavior without vegafusion enabled. With vegafusion transformer disabled: Added a new cell, enabled vegafusion, executed: got a ValueError: alt.data_transformers.enable("vegafusion")
mwe.show()
mwe.save("mwe.html") output:
restarted kernel, enabled vegafusion transformer at the top, re-executed the code that generated that initial screenshot: |
What happened?
I was trying to create a MWE for a possible bug report about data payloads not getting rendered in charts saved to html. Along the way, I spotted some unexpected (to me) behavior that I'd like to understand.
tl;dr - changing encoding from
:Q
to:T
appears to yield notebook-based visuals that differ from HTML-in-browser-based visuals.Setup
Working as expected
Outcome in Jupyter:
Outcome as an exported HTML:
Unexpected
When I change the encoding like so
Outcome in Jupyter:
Outcome as an exported HTML:
The
view source
output for mwe2 is as follows:The output of
pprint.pprint(mwe2.to_dict())
is as follows:What would you like to happen instead?
I would expect that the in-notebook and in-browser view should be consonant.
The browser being used to visualize the exported HTML file is Edge Version 131.0.2903.70 (Official build) (64-bit).
I'm using
altair 5.4.1
jupyterlab 4.2.3
python 3.12.2
Which version of Altair are you using?
5.4.1
The text was updated successfully, but these errors were encountered: