Hi,
I've created plots with interactive legends that were working yesterday, but the interactivity appears to be completely unresponsive today.
Running the code in the examples gallery also fails to generate an interactive legend for me locally:
```import altair as alt
from vega_datasets import data
source = data.unemployment_across_industries.url
selection = alt.selection_multi(fields=['series'], bind='legend')
alt.Chart(source).mark_area().encode(
alt.X('yearmonth(date):T', axis=alt.Axis(domain=False, format='%Y', tickSize=0)),
alt.Y('sum(count):Q', stack='center', axis=None),
alt.Color('series:N', scale=alt.Scale(scheme='category20b')),
opacity=alt.condition(selection, alt.value(1), alt.value(0.2))
).add_selection(
selection
)
```
For reference I am using Altair version 4.1.0 and working in Jupyter notebook.
Any help would be greatly appreciated!
Hello,
I have the same problem, the interactive plots I created and saved as .html last week stopped being responsive when I open them in my browser.
I also tried to run the code snippet posted by @hwilliams10 and I could reproduce the same error.
I am using the same Altair version: 4.1.0.
Thank you!
It looks like this was caused by the Vega 5.12.1 release. It works if I pin the vega JS version to 5.12.0
Reported in https://github.com/vega/vega/issues/2641
Thank you @jakevdp! Saving the charts with vega_version='5.12.0' made them work again.
Vega has released 5.12.2 with a fix, so the workaround should no longer be necessary.
I can still reproduce the error when the parameter vega_version='5.12.0' isn't set.
It鈥檚 probably due to your browser cacheing the old library version.
@hwilliams10 This issue should be closed as the 5.12.2 fix resolves the error.
I wanted to make a note about caching issues. I found problems persisted on certain pages even after attempting to clear cached files in chrome. I learned that if you open the developer console and right click on the refresh button, you can select Empty Cache and Hard Reload. That has fixed any problems I have encountered so far. (link for more info)