Interface for supplying Arrays of data to a component.

Given data is expected to be two number Arrays of equal length, which will be transformed into a single 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.

Hierarchy

  • DataInputXY

Implemented by

Methods

Methods

  • Append new data points into the series by supplying X and Y coordinates in two separated arrays.

     // Example syntax, number array
    LineSeries.addArraysXY([0, 1, 2, 3], [ 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.addArraysXY([0, 1, 2, 3], float32Array)

    Returns

    Object itself for fluent interface.

    Parameters

    Returns DataInputXY