series

fun series(x: Collection<Number>, y: Collection<Number>, key: Any = series.size)

Adds a series with the provided x values (x), y values (y), and key. x and y should have the same size.


fun series(y: Collection<Number>, key: Any = series.size)
fun series(vararg y: Number, key: Any = series.size)

Adds a series with the provided y values (y) and key, using the y values’ indices as the x values.