Modify plot elements that relate to the axis.

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 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 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 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

Examples

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()