echarts4r
echarts4r copied to clipboard
Saveimage not working with echarts5
SaveImage no longer working with new update.
Would you have a reproducible example? It works on my tests.
I think I ran into the same problem (or at least comparable) :).
I have reproducible example for you:
df <- data.frame(
x = LETTERS[1],
group = c(1,1,1,2,2,2),
a = c(1,0,0,1,1,1),
b = c(1,0,1,0,1,1),
c = c(0,1,1,1,1,0)
)
df %>% group_by(group) %>%
e_charts(x, timeline = TRUE) %>%
e_bar(a, stack = "grp") %>%
e_bar(b, stack = "grp") %>%
e_bar(c, stack = "grp") %>%
e_hide_grid_lines() %>%
e_toolbox(itemSize = 10,feature =
list(saveAsImage =
list( title ="Save!", show = TRUE, pixelRatio = 5,
excludeComponents =
c("timeline"))))
If you use e_toolbox_feature(feature = "saveAsImage")
it just works as expected, but if you use
e_toolbox(itemSize = 10,feature =
list(saveAsImage =
list( title ="Save!", show = TRUE, pixelRatio = 5,
excludeComponents =
c("timeline"))))
instead, the image saving doesn't work.
Hi @JohnCoene, I may be wrong, but I've also recently run into this issue and I think it may be device / renderer specific due to this upstream issue with pixel ratio: https://github.com/apache/echarts/issues/14179