xAxis.c3: C3 Axis

Description Usage Arguments Value See Also Examples

View source: R/options.R

Description

Modify plot elements that relate to the axis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
xAxis(c3, show = TRUE, type = "indexed", localtime = NULL,
  categories = NULL, max = NULL, min = NULL, padding = list(),
  height = NULL, extent = NULL, label = NULL, ...)

## S3 method for class 'c3'
xAxis(c3, show = TRUE, type = "indexed",
  localtime = NULL, categories = NULL, max = NULL, min = NULL,
  padding = list(), height = NULL, extent = NULL, label = NULL,
  ...)

yAxis(c3, show = TRUE, inner = NULL, max = NULL, min = NULL,
  padding = NULL, inverted = NULL, center = NULL, label = NULL,
  ...)

## S3 method for class 'c3'
yAxis(c3, show = TRUE, inner = NULL, max = NULL,
  min = NULL, padding = NULL, inverted = NULL, center = NULL,
  label = NULL, ...)

y2Axis(c3, show = TRUE, inner = NULL, max = NULL, min = NULL,
  padding = NULL, inverted = NULL, center = NULL, label = NULL,
  ...)

## S3 method for class 'c3'
y2Axis(c3, show = TRUE, inner = NULL, max = NULL,
  min = NULL, padding = NULL, inverted = NULL, center = NULL,
  label = NULL, ...)

Arguments

c3

c3 htmlwidget object

show

boolean

type

character on of 'indexed', timeseries' or 'category'

localtime

boolean

categories

character vector. Can be used to modify axis labels. Not needed if already defined in data

max

numeric set value of axis range

min

numeric set value of axis range

padding

list with options:

  • left: numeric pixels

  • right: numeric pixels

height

integer pixels to set height of axis

extent

vector or character function (wrapped in JS()) that returns a vector of values

label

can be character or list with options (see c3 axis-x-label):

  • text: character

  • position: character

label position options for horizontal axis are:

  • inner-right

  • inner-center

  • inner-left

  • outer-right

  • outer-center

  • outer-left

label position options for vertical axis are:

  • inner-top

  • inner-middle

  • inner-bottom

  • outer-top

  • outer-middle

  • outer-bottom

...

additional options passed to the axis object

inner

boolean show axis inside chart (Y and Y2 axis only)

inverted

boolean TRUE will reverse the direction of the axis (Y and Y2 axis only)

center

integer or numeric value for center line (Y and Y2 axis only)

Value

c3

See Also

Other c3: RColorBrewer, c3, grid, legend, region, subchart, tooltip, zoom

Examples

1
2
3
4
5
6
data.frame(a=c(1,2,3,2),b=c(2,3,1,5)) %>%
  c3(axes = list(a = 'y',
                 b = 'y2')) %>%
   xAxis(label = list(text = 'testing',
                      position = 'inner-center')) %>%
   y2Axis()

c3 documentation built on March 16, 2020, 5:07 p.m.

Related to xAxis.c3 in c3...