apex(): update bar config

This commit is contained in:
pvictor 2023-02-22 10:52:04 +01:00
parent de477fec66
commit f83cb879a8
1 changed files with 4 additions and 8 deletions

View File

@ -350,16 +350,12 @@ config_bar <- function(horizontal = FALSE, datetime = FALSE) {
shared = TRUE,
intersect = FALSE,
followCursor = TRUE
),
grid = list(
yaxis = list(lines = list(show = !isTRUE(horizontal))),
xaxis = list(lines = list(show = isTRUE(horizontal)))
)
)
if (isTRUE(horizontal)) {
config <- c(config, list(
grid = list(
yaxis = list(lines = list(show = FALSE)),
xaxis = list(lines = list(show = TRUE))
)
))
}
if (isTRUE(datetime)) {
config$xaxis$type <- "datetime"
}