Type Definitions
Format
Formatter object. It accepts these type of formats:
- %s: string.
- %d: integer.
- %f: float.
- %-s: string left aligned.
- %-d: integer left aligned.
- %-f: float left aligned.
- %.4f: float with 4 decimals (and other number of decimals).
The column object receives the an array of formats. If a value is null it doesn't overwrite the format. It should provide as many formats as headers.
Properties:
| Name | Type | Description | 
|---|---|---|
| header | string | Headers format. | 
| float | string | Float format. | 
| integer | string | Integer format. | 
| string | string | String format. | 
| columns | Array.<string> | Column specific format. | 
Type:
- 
            
Object
Table
Table object data structure (an instantiation of FlexTable).
A valid Table could be:
let table = new FlexTable();The table can be modified in a fine-grained way like this:
let idx = table.idx;
// increment in 1.05 the value of the second row with column header 'time'
table.values[1][idx['time']] += 1.05;Properties:
| Name | Type | Description | 
|---|---|---|
| headers | Array.<string> | can be empty if no headers. | 
| _hlength | int | number of headers. | 
| values | Array.<any> | can be empty if no values. | 
| _vlength | int | number of values (rows). | 
| idx | Object.<string, int> | indices of headers. | 
Type:
- 
            
Object
TableSkel
Table object skeleton data structure.
A valid TableSkel could be:
let table = new FlexTable();and also {headers: [], values: []}.
Properties:
| Name | Type | Description | 
|---|---|---|
| headers | Array.<string> | can be empty if no headers. | 
| values | Array.<any> | can be empty if no values. | 
Type:
- 
            
Object