Constructor
new SpotfireDataTable(dataTableDescription)
Represents a data table in the SpotfireDocumentEditor state to be created when calling applyState.
Parameters:
Name | Type | Description |
---|---|---|
dataTableDescription
|
DataTableDescription |
Methods
getAddedDataColumns(columnName) → {Object|null}
Get corresponding column to be created that has the name
Parameters:
Name | Type | Description |
---|---|---|
columnName
|
String | the added column name searched |
getImportedDataColumns(importedColumnDescription) → {Object|null}
Get the corresponding import as columns definition
Parameters:
Name | Type | Description |
---|---|---|
importedColumnDescription
|
Object | the searched column description |
- returns the search import definition if it exists or null if not
getImportedDataRows(importedColumnDescription) → {Object|null}
Get the corresponding import as rows definition
Parameters:
Name | Type | Description |
---|---|---|
importedColumnDescription
|
ImportedDataAsRowDefinition | the searched row description |
- returns the search import definition if it exists or null if not
getProperty(propertyName)
Get the property definition with the corresponding name
Parameters:
Name | Type | Description |
---|---|---|
propertyName
|
setAddedColumns(columnDefinitionsArray)
Set or update a definition of column to add for the applyState
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
columnDefinitionsArray
|
Array | array of columns description to be added |
||
type
|
SpotfireDataColumnsTypes {Enum} ▼ | the type descriptor of the columns to be added. |
||
Enum options: calculatedDataColumn | ||||
expression
|
String |
<optional> |
Mandatory for SpotfireDataColumnsTypes.calculatedDataColumn. Define the expression to calculate the value |
|
isFrozen
|
Boolean |
<optional> |
false | set if the calculated column is frozen or not |
setImportedDataAsColumns(importedColumnsDefinitionsArray)
Set the list of imported data as columns definition.
Parameters:
Name | Type | Description |
---|---|---|
importedColumnsDefinitionsArray
|
Array.<ImportedDataAsColumnDefinition> | The list of the import description. |
setImportedDataAsRows(importedRowsDefinitionsArray)
Set the list of imported data as rows definition.
Parameters:
Name | Type | Description |
---|---|---|
importedRowsDefinitionsArray
|
Array.<ImportedDataAsRowDefinition> | The list of the import description. |
setProperties(arrayOfProperties)
Set the list of properties to be added to the dataTable
Parameters:
Name | Type | Description |
---|---|---|
arrayOfProperties
|
Array | the list of properties to be added |
name
|
String | the name of the property to be added |
value
|
String | Boolean | Number | the value of the property to be added |
validatePropertyDefinition(propertyDefinition)
Validate the property definition.
Parameters:
Name | Type | Description |
---|---|---|
propertyDefinition
|
DataTablePropertyDefinition | the definition to be validated |
"Value can\'t be object or array. Please correct and retry." if value is of type object
"Property name must start with a letter and contains only letter and digits (no white space, or special characters)" if property name is not spotfire compliant