hc_colors: Colors options for highcharter objects

Description Usage Arguments Examples

View source: R/highcharts-api.R

Description

An array containing the default colors for the chart's series. When all colors are used, new colors are pulled from the start again.

Usage

1

Arguments

hc

A highchart htmlwidget object.

colors

A vector of colors.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(viridisLite)

cols <- viridis(3)
cols <- substr(cols, 0, 7)

highchart() %>%
  hc_add_series(data = sample(1:12)) %>%
  hc_add_series(data = sample(1:12) + 10) %>%
  hc_add_series(data = sample(1:12) + 20) %>%
  hc_colors(cols)

highcharter documentation built on Jan. 3, 2022, 5:08 p.m.