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, shared = TRUE,
intersect = FALSE, intersect = FALSE,
followCursor = TRUE followCursor = TRUE
) ),
)
if (isTRUE(horizontal)) {
config <- c(config, list(
grid = list( grid = list(
yaxis = list(lines = list(show = FALSE)), yaxis = list(lines = list(show = !isTRUE(horizontal))),
xaxis = list(lines = list(show = TRUE)) xaxis = list(lines = list(show = isTRUE(horizontal)))
)
) )
))
}
if (isTRUE(datetime)) { if (isTRUE(datetime)) {
config$xaxis$type <- "datetime" config$xaxis$type <- "datetime"
} }