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
You seem right there seems to be a bug, or at least I can't explain why your approach doesn't work. However you can do what you want if you use e_graphic_g.
Like this:
library(tidyverse)
library(echarts4r)
example_df <- data.frame(type = c("a", "b"),
value = c(10, 20))
example_df %>% echarts4r::e_charts(type) %>%
echarts4r::e_bar(value) %>%
e_graphic_g(list(
elements = list(
list(type = "text",
left = "center", top = "center",
updateAnimation = list(duration = 100),
style = list(fill = "#d3d3d3",
text = "DRAFT",
font = paste("120px", "\"STHeiti\", sans-serif"),
opacity = 0.4)
),
list(type = "image",
right = 20,
top = 20,
z = -999,
style = list(
image = "https://www.r-project.org/logo/Rlogo.png",
width = 150,
height = 150,
opacity = .6
)))))
Hi, thanks for making this awesome package!
I was trying to use both function; e_text_g and e_image_g, they doesn't work together as follows:
Created on 2022-07-13 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: