bar_opts: Bar options

View source: R/apex-options.R

bar_optsR Documentation

Bar options

Description

Use these options in ax_plotOptions().

Usage

bar_opts(
  horizontal = NULL,
  endingShape = NULL,
  columnWidth = NULL,
  barHeight = NULL,
  distributed = NULL,
  colors = NULL,
  dataLabels = NULL,
  ...
)

Arguments

horizontal

Logical. This option will turn a column chart into a horizontal bar chart.

endingShape

Available Options: "flat" or "rounded".

columnWidth

In column charts, columnWidth is the percentage of the available width in the grid-rect.

barHeight

In horizontal bar charts, barHeight is the percentage of the available height in the grid-rect.

distributed

Logical. Turn this option to make the bars discrete. Each value indicates one bar per series.

colors

A list of parameters.

dataLabels

List with fields position (available options: "top", "center" or "bottom")

...

Additional parameters.

Value

A list of options that can be used in ax_plotOptions().

Note

See https://apexcharts.com/docs/options/plotoptions/bar/.

Examples


data("mpg", package = "ggplot2")

apex(mpg, aes(manufacturer)) %>% 
  ax_plotOptions(
    bar = bar_opts(
      endingShape = "rounded",
      columnWidth = 100,
      distributed = TRUE
    )
  )
  

apexcharter documentation built on Sept. 11, 2024, 8:22 p.m.