ax_stroke: Stroke properties

Description Usage Arguments Value Note Examples

View source: R/apex-utils.R

Description

Stroke properties

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ax_stroke(
  ax,
  show = NULL,
  curve = NULL,
  lineCap = NULL,
  width = NULL,
  colors = NULL,
  dashArray = NULL,
  ...
)

Arguments

ax

A apexcharts 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

A apexcharts htmlwidget object.

Note

See https://apexcharts.com/docs/options/stroke/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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)
  )

Example output



apexcharter documentation built on May 11, 2021, 5:05 p.m.