fix heatmap xaxis (force character)
This commit is contained in:
parent
467be227fc
commit
bbda86de93
|
@ -107,6 +107,7 @@ importFrom(rlang,is_function)
|
||||||
importFrom(rlang,is_list)
|
importFrom(rlang,is_list)
|
||||||
importFrom(rlang,is_named)
|
importFrom(rlang,is_named)
|
||||||
importFrom(rlang,is_null)
|
importFrom(rlang,is_null)
|
||||||
|
importFrom(rlang,quo)
|
||||||
importFrom(rlang,quos)
|
importFrom(rlang,quos)
|
||||||
importFrom(rlang,sym)
|
importFrom(rlang,sym)
|
||||||
importFrom(rlang,syms)
|
importFrom(rlang,syms)
|
||||||
|
|
5
R/apex.R
5
R/apex.R
|
@ -212,8 +212,11 @@ is_sized <- function(x) {
|
||||||
any(c("size", "z") %in% names(x))
|
any(c("size", "z") %in% names(x))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#' @importFrom rlang quo
|
||||||
rename_aes_heatmap <- function(mapping) {
|
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 <- names(mapping)
|
||||||
n_mapping[n_mapping == "y"] <- "group"
|
n_mapping[n_mapping == "y"] <- "group"
|
||||||
if ("fill" %in% n_mapping) {
|
if ("fill" %in% n_mapping) {
|
||||||
|
|
|
@ -306,10 +306,15 @@ apex(mpg, aes(hwy, class), "boxplot") %>%
|
||||||
ax_plotOptions(
|
ax_plotOptions(
|
||||||
boxPlot = boxplot_opts(color.upper = "#8BB0A6", color.lower = "#8BB0A6" )
|
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
|
## Dumbbell charts
|
||||||
|
|
||||||
Create Dumbbell chart with:
|
Create Dumbbell chart with:
|
||||||
|
|
Loading…
Reference in New Issue