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

Unable to add special days / special colors with a custom start/end date #34

Open
parkerbailey opened this issue Dec 19, 2024 · 0 comments

Comments

@parkerbailey
Copy link

If the user is passing in dates for the from = and to = arguments, they'll be presented with the following error from geom_tile():

Error in `geom_tile()`:
! Problem while computing aesthetics.
i Error occurred in the 1st layer.
Caused by error in `check_aesthetics()`:
! Aesthetics must be either length 1 or the same as the data (110).
x Fix the following mappings: `fill`.
Backtrace:
  1. base (local) `<fn>`(x)
  2. ggplot2:::print.ggplot(x)
  4. ggplot2:::ggplot_build.ggplot(x)
  5. ggplot2:::by_layer(...)
 12. ggplot2 (local) f(l = layers[[i]], d = data[[i]])
 13. l$compute_aesthetics(d, plot)
 14. ggplot2 (local) compute_aesthetics(..., self = self)
 15. ggplot2:::check_aesthetics(evaled, n)

This would suggest that use of a date-restricted calendar view along with special days and colors are not supported concurrently. Example of the code I used when this error was discovered:

events <- c(254, 262, 268, 276, 296, 305, 319, 324, 344, 345, 346, 347, 348, 351, 352, 353)

calendR(
  from = "2024-09-01",
  to = today(),
  special.days = events,
  special.col = "pink"
)
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

1 participant