Closed plasmak11 closed 10 months ago
Thanks for the report. Could you provide a full document .qmd reproducible example using correct markdown syntax to include it ? https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us
You can edit your post to include this. Thanks - that will help us help you
I can't reproduce this:
Thanks for the report. Could you provide a full document .qmd reproducible example using correct markdown syntax to include it ? https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us
You can edit your post to include this. Thanks - that will help us help you
Working with sensitive data so will try iron out something simple to replicate...
@cderv @cscheid
Seems like this is a weird outlier combination of using R and python, using reticulate environment.
Tried out deleting all of the R chunks --> all Altair charts render as designed, each chart with unique <div id=
When adding R chunks --> Altair charts end up with id of <div id="vis"
reticulate environment
That's for here, then: https://github.com/rstudio/reticulate
Thank you for the redirection! @cderv @cscheid - looked into reticulate python renderer -- current workaround will be re-rendering it using vegawidget
chart1 = fig1.to_json()
as_vegaspec(py$chart1)
e.g. Someone's gist snippet:
https://gist.github.com/ijlyttle/aa314d02b5f7f85702ea2a648393b21f
Issue related to the displaying mechanism for Altair charts are programmed either in Quarto or Altair
What works:
For simple charts:
Will generate two figures, each in their cell blocks.
Problem:
When the charts are "layered" or "concatenated charts", the first chart gets replaced by the next chart, next chart, subsequent charts. First rendering block ends up with the last complex Altair chart.
Basically "overwriting" the chart as it renders
What I can discover from the HTML preview on web browser:
Altair layered/concatenated charts don't end up with unique
div id
, but rather a defaultvis
. All subsequent charts get this ID:Simple charts end up with unique ID, which can be changed via naming the chunks.
Unsure if this is Altair issue or Quarto issue.
P.S. Full .qmd file:
Heading
Chart1
Chart2
Chart3
Table