Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Dataset

Creates a dataset out of data, where data is an array of any numeric values.

Hierarchy

  • Dataset

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new Dataset(data?: any[], key?: undefined | string): Dataset
  • Creates a dataset after type-casting given data values to quotes.

    Parameters

    • Optional data: any[]

      Array of any type of values or Quote.

    • Optional key: undefined | string

    Returns Dataset

Properties

Protected _value

_value: Quote[]

Accessors

quotes

value

Methods

add

  • add(quote: Quote): this
  • Adds a given quote to the end of the dataset.

    Parameters

    Returns this

    self reference.

apply

  • apply(...indicators: Indicator<any>[]): this
  • Applies given indicators to every quotes of the dataset.

    Parameters

    • Rest ...indicators: Indicator<any>[]

      Array of Indicator.

    Returns this

    self reference.

at

  • at(position: number): Quote
  • Get quote at the given zero based position

    Parameters

    • position: number

      number, where 0 is first index, and -1 is the last index.

    Returns Quote

    • Quote if found.

flatten

  • flatten(attribute: string): any[]
  • Flatten quote over an attribute

    Parameters

    • attribute: string

      The attribute.

    Returns any[]

    flatten array.

update

  • update(quote: Quote): this
  • Updates the last quote of the dataset with the given quote.

    Parameters

    Returns this

    self reference.

Generated using TypeDoc