Learn R Programming

c3 (version 0.3.2)

c3_mixedGeom: Mixed Geometry Plots

Description

Use multiple geometry types in a single plot

Usage

c3_mixedGeom(c3, types, type = "line", stacked = NULL)

Value

c3

Arguments

c3

c3 htmlwidget object

types

list containing key value pairs of column header and plot type

type

character default plot type where not defined

stacked

character vector of column headers to stack

Examples

Run this code
data <- data.frame(a = abs(rnorm(20) *10),
                   b = abs(rnorm(20) *10),
                   c = abs(rnorm(20) *10),
                   d = abs(rnorm(20) *10))
data %>%
  c3() %>%
  c3_mixedGeom(type = 'bar',
               stacked = c('b','d'),
               types = list(a='area',
                            c='spline'))

Run the code above in your browser using DataLab