From f83cb879a84690948762e24da91b98fe3e96a9bb Mon Sep 17 00:00:00 2001 From: pvictor Date: Wed, 22 Feb 2023 10:52:04 +0100 Subject: [PATCH] apex(): update bar config --- R/apex.R | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/R/apex.R b/R/apex.R index 0529646..e165f49 100644 --- a/R/apex.R +++ b/R/apex.R @@ -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" }