fix heatmap xaxis (force character)

This commit is contained in:
pvictor 2023-08-23 10:42:59 +02:00
parent 467be227fc
commit bbda86de93
3 changed files with 11 additions and 2 deletions

View File

@ -107,6 +107,7 @@ importFrom(rlang,is_function)
importFrom(rlang,is_list)
importFrom(rlang,is_named)
importFrom(rlang,is_null)
importFrom(rlang,quo)
importFrom(rlang,quos)
importFrom(rlang,sym)
importFrom(rlang,syms)

View File

@ -212,8 +212,11 @@ is_sized <- function(x) {
any(c("size", "z") %in% names(x))
}
#' @importFrom rlang quo
rename_aes_heatmap <- function(mapping) {
if (is.null(mapping["x"]))
stop("apex(..., type = 'heatmap') must have an 'x' aesthetic", call. = FALSE)
mapping[["x"]] <- quo(as.character(!!mapping[["x"]]))
n_mapping <- names(mapping)
n_mapping[n_mapping == "y"] <- "group"
if ("fill" %in% n_mapping) {

View File

@ -306,10 +306,15 @@ apex(mpg, aes(hwy, class), "boxplot") %>%
ax_plotOptions(
boxPlot = boxplot_opts(color.upper = "#8BB0A6", color.lower = "#8BB0A6" )
) %>%
ax_stroke(colors = list("#2A5769"))
ax_stroke(colors = list("#2A5769")) %>%
ax_grid(
xaxis = list(lines = list(show = TRUE)),
yaxis = list(lines = list(show = FALSE))
)
```
## Dumbbell charts
Create Dumbbell chart with: