powered by
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.
legend(c3, hide = FALSE, position = NULL, inset = NULL, item = NULL, ...)# S3 method for c3 legend(c3, hide = FALSE, position = NULL, inset = NULL, item = NULL, ...)
# S3 method for c3 legend(c3, hide = FALSE, position = NULL, inset = NULL, item = NULL, ...)
c3
c3 htmlwidget object
boolean or character of parameters to hide
character one of 'bottom', 'right', 'inset'
list with options:
character one of 'top-left', 'top-right', 'bottom-left', 'bottom-right'
integer pixels
numeric
character js function, wrap character or character vector in JS()
additional options passed to the legend object
Other c3: RColorBrewer(), c3(), grid(), region(), subchart(), tooltip(), xAxis(), zoom()
RColorBrewer()
c3()
grid()
region()
subchart()
tooltip()
xAxis()
zoom()
mtcars %>% c3(x = 'mpg', y = 'wt', group = 'cyl') %>% c3_scatter() %>% legend(position = 'right')
Run the code above in your browser using DataLab