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),
|
X = seq_along(facets),
|
||||||
FUN = function(i) {
|
FUN = function(i) {
|
||||||
facet <- facets[[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
|
facet
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -94,7 +97,7 @@ ax_facet_wrap <- function(ax,
|
||||||
vars,
|
vars,
|
||||||
nrow = NULL,
|
nrow = NULL,
|
||||||
ncol = NULL,
|
ncol = NULL,
|
||||||
labeller = ggplot2::label_value,
|
labeller = label_value,
|
||||||
chart_height = "300px") {
|
chart_height = "300px") {
|
||||||
if (!inherits(ax, "apex"))
|
if (!inherits(ax, "apex"))
|
||||||
stop("ax_facet_wrap only works with charts generated with apex()", call. = FALSE)
|
stop("ax_facet_wrap only works with charts generated with apex()", call. = FALSE)
|
||||||
|
|
|
@ -4,7 +4,14 @@
|
||||||
\alias{ax_facet_wrap}
|
\alias{ax_facet_wrap}
|
||||||
\title{Facet wrap for ApexCharts}
|
\title{Facet wrap for ApexCharts}
|
||||||
\usage{
|
\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{
|
\arguments{
|
||||||
\item{ax}{An \code{apexcharts} \code{htmlwidget} object.}
|
\item{ax}{An \code{apexcharts} \code{htmlwidget} object.}
|
||||||
|
|
Loading…
Reference in New Issue