JohnCoene / echarts4r

🐳 ECharts 5 for R
http://echarts4r.john-coene.com/
Other
587 stars 82 forks source link

e_add_nested() doesn't seem to work in combination with polar #494

Open rdatasculptor opened 1 year ago

rdatasculptor commented 1 year ago

I think I found a bug of some kind. If I use e_polar in comination with e_add_nested() I get an error.

e.g.

  data.frame(
    x = seq(50),
    y = rnorm(50, 10, 3),
    z = rnorm(50, 11, 2),
    w = rnorm(50, 9, 2)
  ) |> mutate(color = "red") |>
    e_charts(x) |> 
    e_polar() |> 
    e_angle_axis(x) |> # angle = x
    e_radius_axis() |> 
    e_bar(y, coord_system = "polar") |> 
    e_add_nested("itemStyle", color) |>
    e_scatter(z, coord_system = "polar") 

Gives me this error

Error in FUN(X[[i]], ...) : 
  'options' must be a fully named list, or have no names (NULL)

I am not sure where this goes wrong. Any ideas anyone? :)

rdatasculptor commented 1 year ago

Hi @JohnCoene, no rush, but do you think it is a bug or can I fix it myself in the code? Thanks!