Learn R Programming

vchartr (version 0.1.4)

v_specs_colors: Set color(s) for chart

Description

Set color(s) for chart

Usage

v_specs_colors(vc, ...)

Value

A vchart()

htmlwidget object.

Arguments

vc

An htmlwidget created with vchart().

...

Colors options, can be a single color code, a vector of colors to use or a list with more options. For v_colors_manual it should be a named list with data values as name and color as values.

Examples

Run this code
library(vchartr)
data("mpg", package = "ggplot2")

vchart(table(Class = mpg$class)) %>%
  v_bar(aes(Class, Freq)) %>%
  v_specs_colors("#8FBCBB")

Run the code above in your browser using DataLab