Class sap.chart.data.DimensionModule: sap/chart/data/Dimension

extends Element
known direct subclasses: TimeDimension

Definition of a single dimension in a chart


Since: 1.32.0.
Constructor Summary
new sap.chart.data.Dimension(sId?, mSettings?)Constructor for a new ui5/data/Dimension.
Method Summary
sap.chart.data.Dimension.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.chart.data.Dimension with name sClassName and enriches it with the information contained in oClassInfo.
sap.chart.data.Dimension.getMetadata()Returns a metadata object for class sap.chart.data.Dimension.
getDisplayText()Gets current value of property displayText.
getLabel()Gets current value of property label.
getName()Gets current value of property name.
getRole()Gets current value of property role.
getTextFormatter()Gets current value of property textFormatter.
getTextProperty()Gets current value of property textProperty.
setDisplayText(bDisplayText)Sets a new value for property displayText.
setLabel(sLabel)Sets a new value for property label.
setName(sName)Sets a new value for property name.
setRole(sRole)Sets a new value for property role.
setTextFormatter(fnTextFormatter)Sets a new value for property textFormatter.
setTextProperty(sTextProperty)Sets a new value for property textProperty.
Constructor Detail
new sap.chart.data.Dimension(sId?, mSettings?)
Constructor for a new ui5/data/Dimension.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Element can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Method Detail
sap.chart.data.Dimension.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.chart.data.Dimension 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.core.Element.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.chart.data.Dimension.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.chart.data.Dimension.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getDisplayText(): boolean
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.

Returns:
{boolean} Value of property displayText
getLabel(): string
Gets current value of property label.

Label for the Dimension, either as a string literal or by a pointer using the binding syntax to some property containing the label.

Returns:
{string} Value of property label
getName(): string
Gets current value of property name.

Property in the "data" model holding the (always unique) Dimension key.

Returns:
{string} Value of property name
getRole(): string
Gets current value of property role.

How the Dimension will influence the chart layout. Possible values are "category" or "series". The default is "category". NOTE: Has no effect if the Dimension is used as inResultDimensions by Chart

Default value is category.

Returns:
{string} Value of property role
getTextFormatter(): function
Gets current value of property textFormatter.

Function returning a formatted text for a Dimension key value that will be used for axis labelling. If specified, this property takes precedence over the "textProperty" property of the Dimension. Dimension key value and the corresponding text will be passed to the supplied function as parameters.

Returns:
{function} Value of property textFormatter
getTextProperty(): string
Gets current value of property textProperty.

Text for a Dimension key value, typically by a pointer using the binding syntax to some property containing the text.

Returns:
{string} Value of property textProperty
setDisplayText(bDisplayText): sap.chart.data.Dimension
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.

Parameters:
{boolean}bDisplayText New value for property displayText
Returns:
{sap.chart.data.Dimension} Reference to this in order to allow method chaining
setLabel(sLabel): sap.chart.data.Dimension
Sets a new value for property label.

Label for the Dimension, either as a string literal or by a pointer using the binding syntax to some property containing the label.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sLabel New value for property label
Returns:
{sap.chart.data.Dimension} Reference to this in order to allow method chaining
setName(sName): sap.chart.data.Dimension
Sets a new value for property name.

Property in the "data" model holding the (always unique) Dimension key.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sName New value for property name
Returns:
{sap.chart.data.Dimension} Reference to this in order to allow method chaining
setRole(sRole): sap.chart.data.Dimension
Sets a new value for property role.

How the Dimension will influence the chart layout. Possible values are "category" or "series". The default is "category". NOTE: Has no effect if the Dimension is used as inResultDimensions by Chart

When called with a value of null or undefined, the default value of the property will be restored.

Default value is category.

Parameters:
{string}sRole New value for property role
Returns:
{sap.chart.data.Dimension} Reference to this in order to allow method chaining
setTextFormatter(fnTextFormatter): sap.chart.data.Dimension
Sets a new value for property textFormatter.

Function returning a formatted text for a Dimension key value that will be used for axis labelling. If specified, this property takes precedence over the "textProperty" property of the Dimension. Dimension 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.

Parameters:
{function}fnTextFormatter New value for property textFormatter
Returns:
{sap.chart.data.Dimension} Reference to this in order to allow method chaining
setTextProperty(sTextProperty): sap.chart.data.Dimension
Sets a new value for property textProperty.

Text for a Dimension key value, typically by a pointer using the binding syntax to some property containing the text.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{string}sTextProperty New value for property textProperty
Returns:
{sap.chart.data.Dimension} Reference to this in order to allow method chaining