unlist facet label
This commit is contained in:
parent
70eb611091
commit
ff7b5ba7d9
|
@ -7,7 +7,10 @@ get_facets <- function(data, vars) {
|
|||
X = seq_along(facets),
|
||||
FUN = function(i) {
|
||||
facet <- facets[[i]]
|
||||
attr(facet, "keys") <- strsplit(x = names(facets)[i], split = "|__|", fixed = TRUE)
|
||||
attr(facet, "keys") <- strsplit(
|
||||
x = names(facets)[i],
|
||||
split = "|__|", fixed = TRUE
|
||||
)[[1]]
|
||||
facet
|
||||
}
|
||||
)
|
||||
|
@ -94,7 +97,7 @@ ax_facet_wrap <- function(ax,
|
|||
vars,
|
||||
nrow = NULL,
|
||||
ncol = NULL,
|
||||
labeller = ggplot2::label_value,
|
||||
labeller = label_value,
|
||||
chart_height = "300px") {
|
||||
if (!inherits(ax, "apex"))
|
||||
stop("ax_facet_wrap only works with charts generated with apex()", call. = FALSE)
|
||||
|
|
|
@ -4,7 +4,14 @@
|
|||
\alias{ax_facet_wrap}
|
||||
\title{Facet wrap for ApexCharts}
|
||||
\usage{
|
||||
ax_facet_wrap(ax, vars, nrow = NULL, ncol = NULL, chart_height = "300px")
|
||||
ax_facet_wrap(
|
||||
ax,
|
||||
vars,
|
||||
nrow = NULL,
|
||||
ncol = NULL,
|
||||
labeller = label_value,
|
||||
chart_height = "300px"
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{ax}{An \code{apexcharts} \code{htmlwidget} object.}
|
||||
|
|
Loading…
Reference in New Issue