Skip to contents

Alternative axis labels

Usage

ax_labels(ax, ...)

ax_labels2(ax, labels)

Arguments

ax

An apexchart() htmlwidget object.

...

Vector. In Axis Charts (line / column), labels can be set instead of setting xaxis categories option. While, in pie/donut charts, each label corresponds to value in series array.

labels

A vector to use as labels.

Value

An apexchart()

htmlwidget object.

Examples

apexchart() %>% 
  ax_chart(type = "pie") %>% 
  ax_series(23, 45, 56) %>% 
  ax_labels("A", "B", "C")
# same as apexchart() %>% ax_chart(type = "pie") %>% ax_series2(c(23, 45, 56)) %>% ax_labels2(c("A", "B", "C"))