class sap.ui.mdc.chart.DimensionItem

Visiblity: restricted
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/mdc/chart/DimensionItem
Application Component: CA-UI5-MDC

The Item for the field/property metadata used within MDC controls, an instance can be created to override the default/metadata behavior.

Note:

The control is experimental and the API/behaviour is not finalised and hence this should not be used for productive usage.


Constructor

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


Properties

Name Type Default Value Description
criticality object

The criticality for coloring

Since: 1.64.

Visibility: public
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

Borrowed Properties

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

Methods Overview

Method Description
_isHierarchyDimension
_isTimeDimension
sap.ui.mdc.chart.DimensionItem.extend

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.

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 true.

getInResult

Gets current value of property inResult.

Specifies whether item as a dimension is part of the inResult of inner chart

Default value is false.

getLevel

Gets current value of property level.

The level for hierachy dimension

Default value is undefined.

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 "category".

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 undefined.

getVizItemType
setCriticality

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.

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 null or undefined, the default value of the property will be restored.

Default value is true.

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 null or undefined, the default value of the property will be restored.

Default value is false.

setLevel

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.

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 null or undefined, the default value of the property will be restored.

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 null or undefined, the default value of the property will be restored.

setTimeUnit

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.

toChart

Pushes updates on the item to the inner chart

toVizChartItem

Returns a promise that resolves to a Vizchart Item with given metadata

_isHierarchyDimension

_isTimeDimension

sap.ui.mdc.chart.DimensionItem.extend

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

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 true.

getInResult

Gets current value of property inResult.

Specifies whether item as a dimension is part of the inResult of inner chart

Default value is false.

getLevel

Gets current value of property level.

The level for hierachy dimension

Default value is undefined.

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 "category".

getSettings

Translate mdc dimension item settings to viz chart dimension settings

Param Type DefaultValue Description
mMetadata undefined

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 undefined.

getVizItemType

setCriticality

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 criticality

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 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 displayText

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 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 inResult

setLevel

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 level

setRole

Role of the inner chart item, see @sap.ui.mdc.ChartItemRoleType

Param Type DefaultValue Description
vRole undefined

The role of the inner chart item

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 null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
fnTextFormatter function

New value for property textFormatter

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 null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
sTextProperty string

New value for property textProperty

setTimeUnit

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 timeUnit

toChart

Pushes updates on the item to the inner chart

Param Type DefaultValue Description
oChart object

chart to push the update to

toVizChartItem

Returns a promise that resolves to a Vizchart Item with given metadata

Param Type DefaultValue Description
mMetadata undefined

given metadata for the item