Add colours to datasets within a chartjs object

cjs_scale_color(
  p,
  backgroundColors,
  borderColors,
  match_background_and_border = FALSE
)

Arguments

p

chartjs object

backgroundColors

vector of colours. Can be named to match the labels in the datasets. A single unnamed value will colour all datasets.

borderColors

vector of colours. Can be named to match the labels in the datasets. A single unnamed value will colour all datasets.

match_background_and_border

= FALSE

Value

An object of class htmlwidget