Stroke properties
Usage
ax_stroke(
ax,
show = NULL,
curve = NULL,
lineCap = NULL,
width = NULL,
colors = NULL,
dashArray = NULL,
...
)
Arguments
- ax
An
apexchart()
htmlwidget
object.- show
Logical. To show or hide path-stroke / line
- curve
In line / area charts, whether to draw smooth lines or straight lines. Available Options:
"smooth"
(connects the points in a curve fashion. Also known as spline) and"straight"
(connect the points in straight lines.).- lineCap
For setting the starting and ending points of stroke. Available Options:
"butt"
(ends the stroke with a 90-degree angle),"square"
(similar to butt except that it extends the stroke beyond the length of the path) and"round"
(ends the path-stroke with a radius that smooths out the start and end points)- width
Sets the width of border for svg path.
- colors
Colors to fill the border for paths.
- dashArray
Creates dashes in borders of svg path. Higher number creates more space between dashes in the border.
- ...
Additional parameters.
Value
An apexchart()
htmlwidget
object.
Examples
data("economics", package = "ggplot2")
apex(
data = economics,
mapping = aes(x = date, y = uempmed),
type = "line"
) %>%
ax_stroke(
width = 1,
dashArray = 4
)
data("economics_long", package = "ggplot2")
apex(
data = economics_long,
mapping = aes(x = date, y = value01, group = variable),
type = "line"
) %>%
ax_stroke(
width = c(1, 2, 3, 4, 5),
dashArray = c(1, 2, 3, 4, 5)
)