ax_grid | R Documentation |
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,
...
)
ax |
An |
show |
Logical. To show or hide grid area (including xaxis / yaxis) |
borderColor |
Colors of grid borders / lines. |
strokeDashArray |
Creates dashes in borders of svg path. Higher number creates more space between dashes in the border. |
position |
Whether to place grid behind chart paths of in front. Available options for position: |
xaxis |
A list of parameters. |
yaxis |
A list of parameters. |
row |
A list of parameters. |
column |
A list of parameters. |
padding |
A list of parameters. |
... |
Additional parameters. |
An apexchart()
htmlwidget
object.
See https://apexcharts.com/docs/options/grid/
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))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.