pieopt_ist: Pie and donut options

Description Usage Arguments See Also Examples

View source: R/options.R

Description

Pass options to pie type.

Usage

1
2
3
pieopt_ist(p, percent = FALSE, donut = FALSE, showLabel = FALSE,
  startAngle, total, donutWidth, labelDirection, labelOffset, width, height,
  low, high, chartPadding, ...)

Arguments

p

a chartist object.

percent

convert to percent.

donut

set to TRUE for donut chart, defaults to FALSE.

showLabel

set to FALSE to hide labels.

startAngle

start angle of the pie chart in degrees.

total

By specifying a total value, the sum of the values in the series must be this total.

donutWidth

donut width.

labelDirection

label direction takes neutral, explode or implode.

labelOffset

numeric to offset labels.

width

set fixed width in pixels or percent (i.e.: 300px, 70%).

height

set fixed height in pixels or percent (i.e.: 300px, 70%).

low

lower bound of value.

high

higher bound of value.

chartPadding

padding around chart div.

...

additional options.

See Also

gauge_ist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
mtcars$models <- rownames(mtcars)

mtcars[1:5,] %>%
    chart_ist(type = "pie") %>%
    add_ist(disp) %>%
    pieopt_ist(startAngle = 270,
        donut = TRUE,
        donutWidth = 50,
        showLabel = FALSE)

mtcars[1:5,] %>%
    chart_ist(x = models, type = "pie") %>%
    add_ist(disp) %>%
    pieopt_ist(labelDirection = "explode",
        labelOffset = 100,
        chartPadding = 50)

mtcars[1:5,] %>%
    chart_ist(type = "pie") %>%
    add_ist(disp) %>%
    pieopt_ist(percent = TRUE)

JohnCoene/chartist documentation built on May 7, 2019, 11:17 a.m.