Examples
slots.getDataItem(<dataItemId>)
slots.getDataItemList()[<index>]
slots.getMappingInfoList()[<index>].dataItem
Members
(static, constant) AGGREGATION_TYPE :String
Enum for all supported aggregation type.
Type:
- String
Properties:
Name | Type | Description |
---|---|---|
none |
String | |
average |
String | |
automatic |
String | |
calculated |
String | |
count |
String | |
countDistinct |
String | |
maximum |
String | |
median |
String | |
minimum |
String | |
standardDeviation |
String | |
total |
String | |
variance |
String |
(static, constant) TOPBOTTOM_TYPE :String
Enum for all supported topbottom type.
Type:
- String
Properties:
Name | Type | Description |
---|---|---|
topcount |
String | |
toppercent |
String | |
bottomcount |
String | |
bottompercent |
String |
Methods
canDrillDown() → {Boolean}
Returns true if the data item is a hierarchy and we can drill down.
Returns:
canDrillDown
- Type
- Boolean
clearDrill(transactionToken)
Clears the drill up or down selection.
Parameters:
Name | Type | Description |
---|---|---|
transactionToken |
transactionToken |
drillDown(value, transactionToken)
Drill down in a data item.
Parameters:
Name | Type | Description |
---|---|---|
value |
String | |
transactionToken |
transactionToken |
drillUp(value, transactionToken)
Drill up in a data item.
Parameters:
Name | Type | Description |
---|---|---|
value |
String | |
transactionToken |
transactionToken |
getAggregation() → {String}
Returns the data item aggregation type.
Returns:
aggregationType is explicitly set, or has a value, otherwise the default metadata aggregation value
- Type
- String
getColumnId() → {String}
Returns the item ID that this data item references. An item ID is the metadata columnId.
Returns:
columnId
- Type
- String
getDataType() → {String}
Returns the item data type.
Returns:
dataType { 'string' | 'decimal' }
- Type
- String
getDrillDownValue() → {String}
Gets the drill down value (member id) if a drill down is set.
Returns:
drillDown value
- Type
- String
getDrillDownValue() → {String}
Gets the drill up value (member id) if a drill up is set.
Returns:
drillUp value
- Type
- String
getFormat(options) → {FormatSpec}
Returns the data format for this data item.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | ignoreDefaultFormatting (ignore any default formatting) |
Returns:
Format spec
- Type
- FormatSpec
getId() → {String}
Returns the unique ID that identifies the given data item.
Returns:
ID of the data item
- Type
- String
getLabel() → {String}
Returns the data item label.
Returns:
Label of the data item
- Type
- String
getSort() → {SortSpec}
Gets the effective sort spec. If a user sort is set, then it is returned. Otherwise, the default sort is returned.
Returns:
- Type
- SortSpec
Example
{
type: String ('asc' | 'desc' | 'null'),
priority: Number,
by: String ('caption' | 'value'),
context: String (column id used for the sort context)
custom: Object (specify sort overrides)
custom.top: String[] (Use values of members to move to the top of the sorted list)
custom.enabled: Boolean (indicate if custom sort is enabled)
}
getTopBottom() → {TopBottomInfo}
Gets the top/bottom information that is set on the data item.
Returns:
- Type
- TopBottomInfo
Example
{
type: String ('topcount' | 'toppercent' | 'bottomcount' | 'bottompercent'),
value: Number,
rank: boolean
context: Object (with itemId and aggregate)
}
getType() → {String}
Returns the type of the data item. The type can be either 'attribute' or 'fact'.
Returns:
type
- Type
- String
hasDefaultAggregation() → {Boolean}
Returns true if the data item aggregation type was not explicitly set.
Returns:
hasDefaultAggregation
- Type
- Boolean
hasDefaultFormat() → {Boolean}
Returns true if the data item format type was not explicitly set.
Returns:
hasDefaultFormat
- Type
- Boolean
hasDefaultSort() → {Boolean}
Returns true if the data item sort type was not explicitly set.
Returns:
hasDefaultSort
- Type
- Boolean
isUnavailable() → {Boolean}
Indicates if the data item is not available. Returns true if the column was deleted or hidden.
Returns:
- Type
- Boolean
setAggregation(aggregationopt, transactionTokenopt)
Sets the data item aggregation type.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
aggregation |
aggregation |
<optional> |
null | |
transactionToken |
transactionToken |
<optional> |
setFormat(formatSpec, transactionToken)
Sets the format spec for the given data item.
Parameters:
Name | Type | Description |
---|---|---|
formatSpec |
FormatSpec | |
transactionToken |
transactionToken |
setSort(sortSpec, transactionToken)
Sets the type, sort-by method and priority of sort on the data item.
Parameters:
Name | Type | Description |
---|---|---|
sortSpec |
SortSpec | |
transactionToken |
transactionToken |
setTopBottom(topBottomInfo, transactionToken)
Sets the top/bottom information on the data item.
Parameters:
Name | Type | Description |
---|---|---|
topBottomInfo |
TopBottomInfo | |
transactionToken |
transactionToken |
Example
{
type: String ('topcount' | 'toppercent' | 'bottomcount' | 'bottompercent'),
value: Number,
rank: boolean,
context: measure (column id) can be used when the topbottom applied on the categories
}