Hi and thanks for reading me. Im trying to generate a plot with a custome palette color, but im getting an error when I use the polar coord system and I don't know why that's happened. Anyone knows how to fix this problem? Thanks a lot for the help.
The code is the following:
library(echarts4r)
library(dplyr)
library(ggplot2)
df <- data.frame(
x = seq(500),
y = rnorm(50, 10, 3),
z = rnorm(50, 11, 2),
w = rnorm(50, 9, 2)
)
df |>
head(90) |>
mutate(
color = after_scale(colorspace::lighten(x,0.4, space = "HLS") )
) |>
e_charts(x) |>
e_polar(show = F) |>
e_angle_axis(show = F) |>
e_radius_axis(x) |>
e_bar(y, coord_system = "polar", barWidth = 1) |>
e_scatter(y, coord_system = "polar", symbol_size = 3) |>
e_theme("auritus") |>
e_tooltip(trigger = "item") |>
e_add_nested("itemStyle", color)