ax_fill | R Documentation |
Fill property
ax_fill(
ax,
type = NULL,
colors = NULL,
opacity = NULL,
gradient = NULL,
image = NULL,
pattern = NULL,
...
)
ax |
An |
type |
Whether to fill the paths with solid colors or gradient.
Available options: |
colors |
Colors to fill the svg paths.. |
opacity |
Opacity of the fill attribute. |
gradient |
A list of parameters. |
image |
A list of parameters. |
pattern |
A list of parameters. |
... |
Additional parameters. |
An apexchart()
htmlwidget
object.
See https://apexcharts.com/docs/options/fill/
data("diamonds", package = "ggplot2")
# Use a pattern to fill bars
apex(
data = diamonds,
mapping = aes(x = color, fill = cut)
) %>%
ax_fill(
type = "pattern",
opacity = 1,
pattern = list(
style = c("circles", "slantedLines", "verticalLines", "horizontalLines", "squares")
)
)
data("economics", package = "ggplot2")
# Customise gradient
apex(
data = economics,
mapping = aes(x = date, y = psavert),
type = "area"
) %>%
ax_fill(gradient = list(
enabled = TRUE,
shadeIntensity = 1,
inverseColors = FALSE,
opacityFrom = 0,
opacityTo = 1,
stops = c(0, 2000)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.