The Item for the field/property metadata used within MDC controls, an instance can be created to override the default/metadata behavior.
The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.
Constructor for a new Item.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.mdc.chart.DimensionItem(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
criticality | object | The criticality for coloring |
|
displayText | boolean | true | Whether a text is displayed. If the "textProperty" property has not been specified, it will be derived from the metadata. Visibility: public |
inResult | boolean | false | Specifies whether item as a dimension is part of the inResult of inner chart Visibility: public |
level | int | undefined | The level for hierachy dimension Visibility: public |
role | string | category | Visibility: public |
textFormatter | function | Function returning a formatted text for a item key value that will be used for axis labelling. If specified, this property takes precedence over the "textProperty" property of the item. item key value and the corresponding text will be passed to the supplied function as parameters. Visibility: public |
|
textProperty | string | Text for a item key value, typically by a pointer using the binding syntax to some property containing the text. NOTE: This property was bound internally if automatically created via metadata of oData service and please call "unbindProperty" before setting. Visibility: public |
|
timeUnit | string | undefined | The time unit @link sap.chart.TimeUnitType Visibility: public |
Name | Type | Default Value | Description |
---|---|---|---|
key | string | The unique identifier of the chart item which reflects to the name of the data property in the resulting data set Visibility: public |
|
label | string | Label for the item, either as a string literal or by a pointer using the binding syntax to some property containing the label. NOTE: This property was bound internally if automatically created via metadata of oData service and please call "unbindProperty" before setting. Visibility: public |
|
type | string | string | The data type Visibility: public |
visible | boolean | true | The visibility of the chart item Visibility: public |
Method | Description |
---|---|
_isHierarchyDimension | |
_isTimeDimension | |
sap.ui.mdc.chart.DimensionItem.extend |
Creates a new subclass of class sap.ui.mdc.chart.DimensionItem with name
|
getCriticality |
Gets current value of property criticality. The criticality for coloring |
getDisplayText |
Gets current value of property displayText. Whether a text is displayed. If the "textProperty" property has not been specified, it will be derived from the metadata. Default value is |
getInResult |
Gets current value of property inResult. Specifies whether item as a dimension is part of the inResult of inner chart Default value is |
getLevel |
Gets current value of property level. The level for hierachy dimension Default value is |
sap.ui.mdc.chart.DimensionItem.getMetadata |
Returns a metadata object for class sap.ui.mdc.chart.DimensionItem. |
getRole |
Gets current value of property role. Default value is |
getSettings |
Translate mdc dimension item settings to viz chart dimension settings |
getTextFormatter |
Gets current value of property textFormatter. Function returning a formatted text for a item key value that will be used for axis labelling. If specified, this property takes precedence over the "textProperty" property of the item. item key value and the corresponding text will be passed to the supplied function as parameters. |
getTextProperty |
Gets current value of property textProperty. Text for a item key value, typically by a pointer using the binding syntax to some property containing the text. NOTE: This property was bound internally if automatically created via metadata of oData service and please call "unbindProperty" before setting. |
getTimeUnit |
Gets current value of property timeUnit. The time unit @link sap.chart.TimeUnitType Default value is |
getVizItemType | |
setCriticality |
Sets a new value for property criticality. The criticality for coloring When called with a value of |
setDisplayText |
Sets a new value for property displayText. Whether a text is displayed. If the "textProperty" property has not been specified, it will be derived from the metadata. When called with a value of Default value is |
setInResult |
Sets a new value for property inResult. Specifies whether item as a dimension is part of the inResult of inner chart When called with a value of Default value is |
setLevel |
Sets a new value for property level. The level for hierachy dimension When called with a value of Default value is |
setRole |
Role of the inner chart item, see @sap.ui.mdc.ChartItemRoleType |
setTextFormatter |
Sets a new value for property textFormatter. Function returning a formatted text for a item key value that will be used for axis labelling. If specified, this property takes precedence over the "textProperty" property of the item. item key value and the corresponding text will be passed to the supplied function as parameters. When called with a value of |
setTextProperty |
Sets a new value for property textProperty. Text for a item key value, typically by a pointer using the binding syntax to some property containing the text. NOTE: This property was bound internally if automatically created via metadata of oData service and please call "unbindProperty" before setting. When called with a value of |
setTimeUnit |
Sets a new value for property timeUnit. The time unit @link sap.chart.TimeUnitType When called with a value of Default value is |
toChart |
Pushes updates on the item to the inner chart |
toVizChartItem |
Returns a promise that resolves to a Vizchart Item with given metadata |
Creates a new subclass of class sap.ui.mdc.chart.DimensionItem with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.mdc.chart.Item.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Gets current value of property displayText.
Whether a text is displayed. If the "textProperty" property has not been specified, it will be derived from the metadata.
Default value is true
.
Gets current value of property inResult.
Specifies whether item as a dimension is part of the inResult of inner chart
Default value is false
.
Gets current value of property level.
The level for hierachy dimension
Default value is undefined
.
Returns a metadata object for class sap.ui.mdc.chart.DimensionItem.
Translate mdc dimension item settings to viz chart dimension settings
Param | Type | DefaultValue | Description |
---|---|---|---|
mMetadata | undefined |
Gets current value of property textFormatter.
Function returning a formatted text for a item key value that will be used for axis labelling. If specified, this property takes precedence over the "textProperty" property of the item. item key value and the corresponding text will be passed to the supplied function as parameters.
Gets current value of property textProperty.
Text for a item key value, typically by a pointer using the binding syntax to some property containing the text.
NOTE: This property was bound internally if automatically created via metadata of oData service and please call "unbindProperty" before setting.
Gets current value of property timeUnit.
The time unit @link sap.chart.TimeUnitType
Default value is undefined
.
Sets a new value for property criticality.
The criticality for coloring
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCriticality | object |
New value for property |
Sets a new value for property displayText.
Whether a text is displayed. If the "textProperty" property has not been specified, it will be derived from the metadata.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bDisplayText | boolean | true |
New value for property |
Sets a new value for property inResult.
Specifies whether item as a dimension is part of the inResult of inner chart
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bInResult | boolean | false |
New value for property |
Sets a new value for property level.
The level for hierachy dimension
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is undefined
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iLevel | int |
New value for property |
Role of the inner chart item, see @sap.ui.mdc.ChartItemRoleType
Param | Type | DefaultValue | Description |
---|---|---|---|
vRole | undefined |
The role of the inner chart item |
Sets a new value for property textFormatter.
Function returning a formatted text for a item key value that will be used for axis labelling. If specified, this property takes precedence over the "textProperty" property of the item. item key value and the corresponding text will be passed to the supplied function as parameters.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnTextFormatter | function |
New value for property |
Sets a new value for property textProperty.
Text for a item key value, typically by a pointer using the binding syntax to some property containing the text.
NOTE: This property was bound internally if automatically created via metadata of oData service and please call "unbindProperty" before setting.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextProperty | string |
New value for property |
Sets a new value for property timeUnit.
The time unit @link sap.chart.TimeUnitType
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is undefined
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTimeUnit | string |
New value for property |