Append new data points into the series by only supplying Y coordinates.
// Example syntax, number array
LineSeries.addArrayY([ 5, 1, 2, 0 ])
This method supports binary data input by using Typed arrays. If your data comes in any binary format, then using the typed array syntax is recommended for best performance.
// Example syntax, typed array (Float32)
const float32Array = new Float32Array(4)
float32Array[0] = 5
float32Array[1] = 1
float32Array[2] = 2
float32Array[3] = 0
LineSeries.addArrayY(float32Array)
Each Y coordinate will be paired with an automatically generated X coordinate.
By default, this continues from the last data point in the series.
However, the behavior of assigning X coordinates can be controlled with the optional step
and start
parameters.
Object itself for fluent interface.
Array of Y-values.
Optional
step: numberOptional step between each X coordinate. Defaults to 1.
Optional
start: numberOptional value for first generated X-value. Defaults to 0.
Interface for supplying an Array of Y data to a component.
Given data is expected to be number values, which will be transformed into an array of XY-compatible points. This method is for end user utility, and simply transform given data to the format of add(). As such, they cause additional performance overhead, so use add() whenever possible.