Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add points to SVG football pitch #497

Open
ihrychaniuk opened this issue Dec 24, 2022 · 0 comments
Open

Add points to SVG football pitch #497

ihrychaniuk opened this issue Dec 24, 2022 · 0 comments
Labels
Help Someone needs help

Comments

@ihrychaniuk
Copy link

Hello!
I try to reproduce this kind of football pitch plot (at least only with svg pitch and points) in R using echarts4r, but any attempts to add points with e_scatter or e_effect_scatter fail for me and I only can show svg image (if I delete e_scatter) from code below.

Is it possible to create similar plot using echarts4r?

data <- tibble::tibble(x = c(10,100,200,300,400),
                       y = c(10,100,200,300,400))

url <- "https://datamatic-public.github.io/echarts-2.1.10/doc/example/svg/football.svg"
svg <- url |> 
  readLines() |> 
  paste0(collapse = "")
data |> 
  e_charts(x) |> 
  e_svg_register("svg", svg) |>
  e_svg(
    x,
    map = "svg",
    label = list(
      show = FALSE
    )
  ) |> e_scatter(y)
@munoztd0 munoztd0 added the Help Someone needs help label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Someone needs help
Projects
None yet
Development

No branches or pull requests

2 participants