Hello and thanks for reading me. Im trying to create a plot with conditional colors and I want to have the same colors for the scatter serie, but im just getting the custom color for the first serie. How I can apply the custom color for both series?
The code is the following:
library(echarts4r) library(dplyr) tibble( year = as.character(sample(1950:2020, 100, replace = T)), y = rnorm(100, 10, 3) ) |> head(10) |> mutate( color = if_else(y > 9, "red", "green") ) |> e_charts(year) |> e_bar(y ) |> e_scatter(y) |> e_add_nested("itemStyle", color)
Thanks for the help