Add a dataset to a chartjs instance

cjs_add_points(p, ..., label = NULL, data = NULL, show_line = FALSE)

Arguments

p

a chartjs htmlwidget

...

aesthetic parameters to pass on to chartjs chart types e.g. x, y, TODO, ...

label

dataset title (used in legends)

data

data from which aesthetic parameters are sourced. If NULL, that within the chartjs htmlwidget is used.

show_line

boolean, whether to connect the points with a line. They will be connected in the order they appear

Value

An object of class htmlwidget