Data2d

A two dimensional array of key-value data structure. The data2d object has the following properties:

Properties

  • Name
    kvs
    Type
    array<kv>
    Description

    An array of kv objects.

  • Name
    keys
    Type
    array<string>
    Description

    An array of key identifiers. Optional. The default is na.

  • Name
    values
    Type
    array<string>
    Description

    An array of converted string values, formatted if applicable. Optional. The default is na.

  • Name
    formatValues
    Type
    array<string>
    Description

    An array of string main values, formatted if applicable. Optional. The default is na.

  • Name
    altValues
    Type
    array<string>
    Description

    An array of converted alternate string values, formatted if applicable. Optional. The default is na.

  • Name
    formatAltValues
    Type
    array<string>
    Description

    An array of main string values, formatted if applicable. Optional. The default is na.

  • Name
    stringValues
    Type
    array<string>
    Description

    An array of main string values. Optional. The default is na.

  • Name
    stringAltValues
    Type
    array<string>
    Description

    An array of alternate string values. Optional. The default is na.

  • Name
    floatValues
    Type
    array<float>
    Description

    An array of main float values. Optional. The default is na.

  • Name
    floatAltValues
    Type
    array<float>
    Description

    An array of alternate float values. Optional. The default is na.

  • Name
    intValues
    Type
    array<int>
    Description

    An array of main integer values. Optional. The default is na.

  • Name
    intAltValues
    Type
    array<int>
    Description

    An array of alternate integer values. Optional. The default is na.

  • Name
    boolValues
    Type
    array<bool>
    Description

    An array of main boolean values. Optional. The default is na.

  • Name
    boolAltValues
    Type
    array<bool>
    Description

    An array of alternate boolean values. Optional. The default is na.

  • Name
    colorValues
    Type
    array<color>
    Description

    An array of main color values. Optional. The default is na.

  • Name
    colorAltValues
    Type
    array<color>
    Description

    An array of alternate color values. Optional. The default is na.

  • Name
    timestampValues
    Type
    array<int>
    Description

    An array of main unix timestamp values. Optional. The default is na.

  • Name
    timestampAltValues
    Type
    array<int>
    Description

    An array of alternate unix timestamp values. Optional. The default is na.

  • Name
    dataType
    Type
    string
    Description

    The data type representing all keys. Possible values are string, float, int, bool, color, timestamp, or mix. Optional. The default is na.

  • Name
    size
    Type
    int
    Description

    Total size of the data2d object. Optional. The default is na.

  • Name
    sorted
    Type
    bool
    Description

    A boolean flag to determine if the data2d object is sorted or not. Optional. The default is na.

  • Name
    asc
    Type
    bool
    Description

    A boolean flag to determine if sorting is in ascending or descending order. Use 'true' for ascending and 'false' for descending. Optional. The default is true.

  • Name
    change
    Type
    bool
    Description

    A boolean flag to determine if sorting uses change percent values. Use 'true' for sorting using change percent value. Optional. The default is false.

  • Name
    format
    Type
    string
    Description

    A default string format for values. Optional. The default is na.

  • Name
    formatTime
    Type
    string
    Description

    A default time format for timestamp values. Optional. The default is 'yyyy-MM-dd hh:mm:ss a z'.

  • Name
    index
    Type
    array<int>
    Description

    An array of integer values representing key index. If the object is sorted, the index will be in sorted order. Optional. The default is na.

  • Name
    timezone
    Type
    string
    Description

    A default timezone value for the data2d object. Optional. The default is 'syminfo.timezone'.


data2d()

The data2d() function is the recommended way to create data2d objects. This function ensures that all keys are unique and performs essential internal functions to create the data2d object efficiently.

  • Name
    kvs
    Type
    array<kv>
    Description

    An array of kv objects.

  • Name
    sort
    Type
    bool
    Description

    Use true for sorting, false otherwise. Optional. The default is false.

  • Name
    asc
    Type
    bool
    Description

    Use true for sort order.ascending, false for sort order.descending. Optional. The default is true.

  • Name
    change
    Type
    bool
    Description

    Sorts using change percent if true. Optional. The default is false.

  • Name
    format
    Type
    string
    Description

    A default format. Optional. The default is na.

  • Name
    timezone
    Type
    string
    Description

    A default timezone. Optional. The default is 'syminfo.timezone'.

  • Name
    returns
    Type
    data2d
    Description

    A data2d object.