r-lib / marquee

Markdown Parser and Renderer for R Graphics
https://marquee.r-lib.org
Other
72 stars 2 forks source link

interaction with ggiraph : element_marquee does not render #33

Open xtimbeau opened 3 days ago

xtimbeau commented 3 days ago

When using {marquee} with {ggiraph} element_marquee is not rendering in the viewer.

Here is a quick reprex :

library(tidyverse)
library(marquee)
library(ggiraph)

plot <- ggplot(cars) + 
  geom_point_interactive(aes(x = speed, y = dist, tooltip = speed)) +
  labs(caption = "*source* : cars dataset") +
  theme(plot.caption = element_marquee())

# caption is there
plot

# caption is gone !
girafe(ggobj = plot)

Should I post the issue to ggiraph ?

thomasp85 commented 3 days ago

Marquee requires a bunch of modern graphics device features which are not yet available in svglite (afaik ggiraph uses svglite to render).

I'm aware of this and am working on a way that svglite and marquee can work together

xtimbeau commented 2 days ago

Thanks, looks promissing. BTW, your package is awesome and filling a gap in ready for publication graph production that was really missing. The auto-wrap feature is fantastic. Most of what you do is beyond my skills, but if you need help, do not hesitate to ask.