Open Lourenzutti opened 2 years ago
For the issue shared in screenshot, it seems like an issue with loading JS dependency in the right order or right time.
Dependencies for altair are dynamically loaded by adding <script>
with async
at the bottom of <head>
https://github.com/altair-viz/altair/blob/168d14bd0a414077c12033c2b5df512e75a77f5b/altair/utils/html.py#L101-L116
I can reproduce with OJS in the presentation, and it works if I remove OJS.
It is reproducible with format: html
also - it is not tied to revealjs
but rather link to conflict between OJS and Vega JS lib
FWIW it works fine with the R version of altair
I believe this is because the dependencies are loaded differently: they are included in <script>
without async
So maybe an issue with how Python version of altair load the resources ?
Hope it helps understand.
Bug description
Hi,
I have a quarto presentation with
Altair
plot andOJS
.For some reason, the Altair plots do not consistently show up on chromium-based browsers (I tested Microsoft Edge and Google Chrome). Weirdly, on Firefox, it works fine.
If I keep refreshing a bunch of times, eventually it works
I published the slides here
Here's the code for
Slide with altair plot
OJS