Add grids on chart
ax_grid(
ax,
show = NULL,
borderColor = NULL,
strokeDashArray = NULL,
position = NULL,
xaxis = NULL,
yaxis = NULL,
row = NULL,
column = NULL,
padding = NULL,
...
)
A apexcharts
htmlwidget
object.
Logical. To show or hide grid area (including xaxis / yaxis)
Colors of grid borders / lines.
Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.
Whether to place grid behind chart paths of in front. Available options for position: "front"
or "back"
A list of parameters.
A list of parameters.
A list of parameters.
A list of parameters.
A list of parameters.
Additional parameters.
A apexcharts
htmlwidget
object.
data("mpg", package = "ggplot2")
# Hide Y-axis and gridelines
apex(
data = mpg,
mapping = aes(x = manufacturer)
) %>%
ax_grid(show = FALSE)
# just grid lines
apex(
data = mpg,
mapping = aes(x = manufacturer)
) %>%
ax_grid(yaxis = list(lines = list(show = FALSE)))
# both x & y
data("economics", package = "ggplot2")
apex(
data = economics,
mapping = aes(x = date, y = psavert),
type = "line"
) %>%
ax_grid(
yaxis = list(lines = list(show = TRUE)),
xaxis = list(lines = list(show = TRUE))
)