Skip to contents

Use these options in ax_plotOptions().

Usage

pie_opts(
  size = NULL,
  donut = NULL,
  customScale = NULL,
  offsetX = NULL,
  offsetY = NULL,
  dataLabels = NULL,
  ...
)

Arguments

size

Numeric. Custom size of the pie which will override the default size calculations.

donut

List with two fields size (Donut / ring size in percentage relative to the total pie area.) and background (The background color of the pie).

customScale

Numeric. Transform the scale of whole pie/donut overriding the default calculations.

offsetX

Numeric. Sets the left offset of the whole pie area.

offsetY

Numeric. Sets the top offset of the whole pie area.

dataLabels

List with field offset (Numeric, Offset by which labels will move outside / inside of the donut area)

...

Additional parameters.

Value

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

Examples

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

apex(mpg, aes(cyl), type = "donut") %>%
  ax_plotOptions(
    pie = pie_opts(
      donut = list(size = "90%", background = "#BABABA")
    )
  )