hc_colors: Colors options for highcharter objects

View source: R/highcharts-api.R

hc_colorsR Documentation

Colors options for highcharter objects

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

hc_colors(hc, colors)

Arguments

hc

A highchart htmlwidget object.

colors

A vector of colors.

Examples


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)


jbkunst/highcharter documentation built on March 14, 2024, 12:52 a.m.