JS_interp: A Helper Function To Create JS Functions For...

Description Usage Arguments Examples

Description

A Helper Function To Create JS Functions For labelInterporationFnc

Usage

1
JS_interp(interval = 1, offset = 0, prefix = NULL, suffix = NULL)

Arguments

interval

interval between labels

offset

offset to the first label

prefix

prefix of labels (e.g. $)

suffix

suffix of labels (e.g. kB)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
#' set.seed(324)
data <- data.frame(
  day = 1:20,
  A   = runif(20, 0, 10),
  B   = runif(20, 0, 10),
  C   = runif(20, 0, 10),
  D   = runif(20, 0, 10)
  )

chartist(data, day) + Line(x_labelInterpolationFnc = JS_interp(4, offset = 2))

chartist(data, day) + Line(x_labelInterpolationFnc = JS_interp(4, prefix = "day "))

## End(Not run)

yutannihilation/chartist documentation built on May 4, 2019, 7:45 p.m.