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

e_axis does not work with dates: "Error: no attribute" (v0.4.4) #505

Closed
awcm0n opened this issue Mar 13, 2023 · 2 comments
Closed

e_axis does not work with dates: "Error: no attribute" (v0.4.4) #505

awcm0n opened this issue Mar 13, 2023 · 2 comments

Comments

@awcm0n
Copy link

awcm0n commented Mar 13, 2023

Customizing a date axis with e_axis does not work: "Error: no attribute"

Here is a minimal example:

library(tidyverse)
library(echarts4r)

df <- tibble(date = c("3/9/2023", "3/10/2023", "3/11/2023"),
             y = c(1, 2, 3)) |>
  mutate(date = as.Date(date))

df |>
  e_charts(date) |>
  e_line(y) |>
  e_x_axis(date)
@awcm0n awcm0n changed the title e_axis does not work with dates: "Error: no attribute" e_axis does not work with dates: "Error: no attribute" (v0.4.4) Mar 13, 2023
@rdatasculptor
Copy link
Contributor

rdatasculptor commented Mar 18, 2023

I am not sure why you put 'date' inside e_x_axis(), but when you remove it and add custumisations to the x axis then everything seems okay? If not, maybe you can explain what you intented in the first place?

this works:

df <- tibble(date = c("3/9/2023", "3/10/2023", "3/11/2023"),
             y = c(1, 2, 3)) |>
  mutate(date = as.Date(date))

df |>
  e_charts(date) |>
  e_line(y) |>
  e_x_axis(name = "this just works!", 
           nameLocation = "center", 
           nameTextStyle = list(fontWeight = "bold", 
                                fontSize = 15))

@awcm0n Did this help you out?

@munoztd0
Copy link
Collaborator

Closing because of inactivity

@munoztd0 munoztd0 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2023
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

3 participants