Fixed ordering of dates changing the calendar "view" (always show latest date)
This commit is contained in:
@@ -19,10 +19,12 @@ formatDates <- function(value, min, max) {
|
||||
value[lubridate::ymd(value) > lubridate::ymd(dates$max)] <- dates$max
|
||||
}
|
||||
dates <- lapply(dates, format, "%Y-%m-%d")
|
||||
value <- lapply(value, format, "%Y-%m-%d")
|
||||
dates <- lapply(dates, function(.x) {
|
||||
if (length(.x) == 0) NULL else .x
|
||||
})
|
||||
sort_order <- sort(as.numeric(value), index.return = TRUE, na.last = FALSE)$ix
|
||||
value <- value[sort_order]
|
||||
value <- lapply(value, format, "%Y-%m-%d")
|
||||
value <- lapply(value, function(.x) {
|
||||
if (length(.x) == 0) NULL else .x
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user