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

Why does the line disappear when it is gray40? #650

Open
denis-or opened this issue Dec 12, 2024 · 1 comment
Open

Why does the line disappear when it is gray40? #650

denis-or opened this issue Dec 12, 2024 · 1 comment

Comments

@denis-or
Copy link

Hi guys,

I noticed a curious event that I reproduce below:

# I create the data
  data_eg <- data.frame(
    week = 1:10,
    n_cases = c(NA, 2, 4, NA, 5, 3, 6, NA, 7, 2)
  )
  
# this works
  data_eg |> 
    echarts4r::e_charts(week) |>
    echarts4r::e_line(
      serie = n_cases,
      symbol = "none",
      color = "#242424"
    ) |>
    echarts4r::e_tooltip(trigger = "axis")

# nope
  data_eg |> 
    echarts4r::e_charts(week) |>
    echarts4r::e_line(
      serie = n_cases,
      symbol = "none",
      color = "gray40"
    ) |>
    echarts4r::e_tooltip(trigger = "axis")

It took me a while to understand why the line disappeared and then it was the color. Why? 😧😧😧

@JohnCoene
Copy link
Owner

gray40 is not a color, you need to pass a valid web color or a valid hex color, e.g.: #000 for black.

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