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

Customising e_radar series #648

Open
Admate8 opened this issue Nov 28, 2024 · 2 comments
Open

Customising e_radar series #648

Admate8 opened this issue Nov 28, 2024 · 2 comments

Comments

@Admate8
Copy link

Admate8 commented Nov 28, 2024

It seems that the basic series customization doesn't fully work for radar charts. Consider the example below:

data.frame(
  category = letters[1:4],
  value_1 = c(40, 50, 60, 70),
  value_2 = c(10, 30, 90, 60) 
) |> 
  echarts4r::e_charts(category) |> 
  echarts4r::e_radar(
    serie = value_1,
    name  = "Serie 1",
    color = "red",
    areaStyle = list(color = "pink")
  ) |> 
  echarts4r::e_radar(
    serie = value_2,
    name  = "Serie 2",
    color = "blue",
    areaStyle = list(color = "cyan")
  ) 

The chart ignores the color and areaStyle arguments passed to the second series. While using e_color does overwrite the colors and resolves the colour issue, I am still unable to change the area colours.

@JohnCoene
Copy link
Owner

This works for me.

    data.frame(
      category = letters[1:4],
      value_1 = c(40, 50, 60, 70),
      value_2 = c(10, 30, 90, 60) 
    ) |> 
      echarts4r::e_charts(category) |> 
      echarts4r::e_radar(
        serie = value_1,
        name  = "Serie 1",
        areaStyle = list()
      ) |> 
      echarts4r::e_radar(
        serie = value_2,
        name  = "Serie 2",
        areaStyle = list()
      ) |>
        e_color(color = c("red", "blue"))

@Admate8
Copy link
Author

Admate8 commented Nov 28, 2024

It does, indeed! Thank you. However, how would you go about passing different customisation parameters to each series? So, say I want the first areaStyle to have opacity = 0.5 and the second opacity = 1; how can I achieve that? For any other plot type, I would just pass different arguments to areaStyle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants