Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DataInputX

Interface for supplying an Array of X 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.

Implemented by

Index

Methods

Methods

addArrayX

  • addArrayX(arrayX: number[], step?: undefined | number, start?: undefined | number): this
  • Add an Array of X-values. Each X-value will be paired with an automatically generated Y-value, based on step-argument.

    For optimal performance, use add() if possible.

    Parameters

    • arrayX: number[]

      Array of X-values.

    • step: undefined | number

      Optional step between each Y coordinate. Defaults to 1.

    • start: undefined | number

      Optional value for first generated Y-value. Defaults to 0.

    Returns this

    Object itself for fluent interface.