Altair plots disappearing with OJS cells on Chromium-based Browser
Nobody has claimed this yet.
Assessment
This issue has not been assessed yet.
Description
Bug description
Hi,
I have a quarto presentation with Altair plot and OJS.
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
---
title: "Altair + OJS -- Error"
format: revealjs
---
```{python}
import pandas as pd
import altair as alt
from vega_datasets import data
```
## Slide with altair plot
```{python}
cars = data.cars()
alt.Chart(cars)\
.mark_point()\
.encode(
x = 'Horsepower:Q',
y = 'Miles_per_Gallon:Q')
```
## OJS
```{ojs}
data = [{'x': 1, 'y': 1}, {'x': 2, 'y': 2}];
Plot.plot({
marks: [
Plot.dot(data, {x: "x", y: "y"})
]});
```
OS: Windows 11 (21H2)
Editor: RStudio (2022.07.1+554) and vscode -- I tried both
Quarto: 1.2.157
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
ecosystem wording
Difficulty 1/5 Under an hour Newbie friendliness 90/100
matrix-org/matrix.org#3649 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vadimdemedes/ink#1029 ·
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·