Home Manual Reference Source Repository
import OrthogonalData from 'waves-ui/src/utils/orthogonal-data.js'
public class | source

OrthogonalData

OrthogonalData transforms an object of arrays {foo: [1, 2], bar: [3, 4]} to or from an array of objects [{foo: 1, bar: 3}, {foo: 2, bar: 4}]

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public set

Sets an object of arrays.

public get

Returns an object of arrays.

public set

Sets an array of objects.

public get

Returns an array of objects.

Method Summary

Public Methods
public

Updates array of objects from object of arrays.

public

Updates object of arrays from array of objects.

Public Constructors

public constructor source

Public Members

public set cols: Object<String, Array> source

Sets an object of arrays.

public get cols: Object<String, Array> source

Returns an object of arrays.

public set rows: Array<Object> source

Sets an array of objects.

public get rows: Array<Object> source

Returns an array of objects.

Public Methods

public updateFromCols() source

Updates array of objects from object of arrays.

public updateFromRows() source

Updates object of arrays from array of objects.