Reference Source
import DataOps from 'd-theia/src/components/DataOps.js'
public class | source

DataOps

The DataOps object is is a class containing reusable static methods to be operated on data

Static Method Summary

Static Public Methods
public static

addColoursToConfig(aValues: Array, bAddRgb: Boolean): Array

Adds colour values to the config array of key values

public static

Returns random data and config for demo purposes.

public static

sliceSampleData(aData: Array, iMaxLength: Integer): Array

Returns a sample selection from an array (minmum length 3).

public static

transformDataKeys(jConfig: JSON, aData: Array): *

Maps custom data keys into standard structure.

Static Public Methods

public static addColoursToConfig(aValues: Array, bAddRgb: Boolean): Array source

Adds colour values to the config array of key values

Params:

NameTypeAttributeDescription
aValues Array

the config values needing colours

bAddRgb Boolean

add RGB object or not?

Return:

Array

A modified version of aValues containing colours

public static getRandomData(): JSON source

Returns random data and config for demo purposes.

Return:

JSON

JSON style data structure

public static sliceSampleData(aData: Array, iMaxLength: Integer): Array source

Returns a sample selection from an array (minmum length 3).

Params:

NameTypeAttributeDescription
aData Array

the complete data set

iMaxLength Integer

max length of sample

Return:

Array

sliced section of data

public static transformDataKeys(jConfig: JSON, aData: Array): * source

Maps custom data keys into standard structure.

Params:

NameTypeAttributeDescription
jConfig JSON

the JSON style config object

aData Array

the chart data to be transformed

Return:

*