You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quarto 1.4 has a lightbox feature that makes images clickable to see a larger version with a zoom animation. However, when adding images to a gt table (using the local_image() or ggplot_image() functions) the lightbox behavior does not apply to them. Is there a way to extend the lightbox functionality to does images too? Thanks!
Here is a minimal reprex with a Quarto document:
---title:"gt lightbox test"format:html:lightbox:trueeditor:visual---```{r}
library(tidyverse)
library(gt)
```
# This plot image works with lightbox```{r}
plot_object<-
ggplot(
data=gtcars,
aes(x=hp, y=trq, size=msrp)
) +
geom_point(color="blue") +
theme(legend.position="none")
plot_object```
# The plot in this table doesn't work with lightbox```{r}
dplyr::tibble(
text="Here is a ggplot:",
ggplot=NA
) |>
gt() |>
text_transform(
locations= cells_body(columns=ggplot),
fn=function(x) {
plot_object|>
ggplot_image(height= px(200))
}
)
```
The text was updated successfully, but these errors were encountered:
Hi all,
Quarto 1.4 has a lightbox feature that makes images clickable to see a larger version with a zoom animation. However, when adding images to a
gt
table (using thelocal_image()
orggplot_image()
functions) the lightbox behavior does not apply to them. Is there a way to extend the lightbox functionality to does images too? Thanks!Here is a minimal reprex with a Quarto document:
The text was updated successfully, but these errors were encountered: