legend.c3: C3 Legend Options

Description Usage Arguments Value See Also Examples

View source: R/legend.R

Description

Modify plot elements that relate to the legend. The c3 legend is on by default, this function allows the legend to be removed, or other legend attributes to be set.

Usage

1
2
3
4
5
6
legend(c3, hide = FALSE, position = NULL, inset = NULL,
  item = NULL, ...)

## S3 method for class 'c3'
legend(c3, hide = FALSE, position = NULL, inset = NULL,
  item = NULL, ...)

Arguments

c3

c3 htmlwidget object

hide

boolean or character of parameters to hide

position

character one of 'bottom', 'right', 'inset'

inset

list with options:

  • anchor: character one of 'top-left', 'top-right', 'bottom-left', 'bottom-right'

  • x: integer pixels

  • y: integer pixels

  • step: numeric

item

list with options:

  • onclick: character js function, wrap character or character vector in JS()

  • onmouseover: character js function, wrap character or character vector in JS()

  • onmouseout: character js function, wrap character or character vector in JS()

...

additional options passed to the legend object

Value

c3

See Also

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

Examples

1
2
3
4
iris %>%
 c3(x='Sepal_Length', y='Sepal_Width', group = 'Species') %>%
 c3_scatter() %>%
 legend(position = 'right')

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

Related to legend.c3 in c3...