opt_ist: Configure options for chartist visualisation

Description Usage Arguments See Also Examples

View source: R/options.R

Description

Pass any option to any chart here. Also see options specific to your chart type, pieopt_ist, baropt_ist or lineopt_ist

Usage

1
opt_ist(p, name, width, height, low, high, chartPadding, ...)

Arguments

p

a chartist object.

name

name the serie, see details (optional).

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

baropt_ist, pieopt_ist, lineopt_ist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
mtcars$models <- row.names(mtcars)

mtcars[1:10,] %>%
    chart_ist(x = models) %>%
    add_ist(wt) %>%
    add_ist(drat) %>%
    opt_ist(chartPadding = 10, width = 700, height = 200)

mtcars[1:10,] %>%
    chart_ist(x = qsec) %>%
    add_ist(disp, name = "DISP") %>%
    add_ist(hp, name = "HP") %>%
    opt_ist(name = "DISP", lineSmoothing = "step") %>%
    opt_ist(name = "HP",
        showArea = TRUE,
        showLine = FALSE,
        showPoint = FALSE)

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