Learn R Programming

c3 (version 0.3.2)

region: Modify region elements on both x and y axis

Description

Regions are defined in multiple axis by passing a single `data.frame`

Usage

region(c3, regions)

# S3 method for c3 region(c3, regions)

Value

c3

Arguments

c3

c3 htmlwidget object

regions

data.frame with columns listed below. Any columns can be missing but results may be unexpected.

axis

character one of 'x', 'y', 'y2'

start

numeric but must match defined axis type

end

numeric but must match defined axis type

class

character css class

See Also

Other c3: RColorBrewer(), c3(), grid(), legend(), subchart(), tooltip(), xAxis(), zoom()

Examples

Run this code
 mtcars %>%
   c3(x = 'mpg', y = 'wt', group = 'cyl') %>%
   c3_scatter() %>%
   region(data.frame(axis = 'x',
                     start = 17,
                     end = 21))

Run the code above in your browser using DataLab