Class sap.chart.data.MeasureModule: sap/chart/data/Measure

extends Element

Definition of a single measure in a chart


Since: 1.32.0.
Constructor Summary
new sap.chart.data.Measure(sId?, mSettings?)Constructor for a new ui5/data/Measure.
Method Summary
sap.chart.data.Measure.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.chart.data.Measure with name sClassName and enriches it with the information contained in oClassInfo.
sap.chart.data.Measure.getMetadata()Returns a metadata object for class sap.chart.data.Measure.
getLabel()Gets current value of property label.
getName()Gets current value of property name.
getRole()Gets current value of property role.
getUnitBinding()Gets current value of property unitBinding.
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.
setUnitBinding(sUnitBinding)Sets a new value for property unitBinding.
getValueFormat()Gets current value of property valueFormat.
setValueFormat(sValueFormat)Sets a new value for property valueFormat.
Constructor Detail
new sap.chart.data.Measure(sId?, mSettings?)
Constructor for a new ui5/data/Measure.

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.Measure.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.chart.data.Measure 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.Measure.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.chart.data.Measure.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getLabel(): string
Gets current value of property label.

Label for the Measure, 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 raw measure value.

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

How values of measure will be rendered in the chart. Possible role values are "axis1", "axis2", "axis3", and "axis4". The default is "axis1". They correspond to the well-known concepts of axis identifiers in the Cartesian coordinate system, e.g. a Y-axis in a bar/column/line chart, an X- and a Y-axis in a scatter chart, or two Y-axes in bar charts, and an optional third axis for the weight/size/intensity/temperature of a data point.

Default value is axis1.

Returns:
{string} Value of property role
getUnitBinding(): string
Gets current value of property unitBinding.

Unit for the measure, a pointer using the binding syntax to some field containing the unit. Value of the given field from the same data record will be displayed after formatted measure value in data label, tooltip and chart popover. NOTE: If the unit field is not set as visible dimension in chart, or more than one unit value exists for any visible dimension value combination, they will be rendered in the chart resulting different chart layout.

Returns:
{string} Value of property unitBinding
setLabel(sLabel): sap.chart.data.Measure
Sets a new value for property label.

Label for the Measure, 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.Measure} Reference to this in order to allow method chaining
setName(sName): sap.chart.data.Measure
Sets a new value for property name.

Property in the "data" model holding the raw measure value.

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.Measure} Reference to this in order to allow method chaining
setRole(sRole): sap.chart.data.Measure
Sets a new value for property role.

How values of measure will be rendered in the chart. Possible role values are "axis1", "axis2", "axis3", and "axis4". The default is "axis1". They correspond to the well-known concepts of axis identifiers in the Cartesian coordinate system, e.g. a Y-axis in a bar/column/line chart, an X- and a Y-axis in a scatter chart, or two Y-axes in bar charts, and an optional third axis for the weight/size/intensity/temperature of a data point.

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

Default value is axis1.

Parameters:
{string}sRole New value for property role
Returns:
{sap.chart.data.Measure} Reference to this in order to allow method chaining
setUnitBinding(sUnitBinding): sap.chart.data.Measure
Sets a new value for property unitBinding.

Unit for the measure, a pointer using the binding syntax to some field containing the unit. Value of the given field from the same data record will be displayed after formatted measure value in data label, tooltip and chart popover. NOTE: If the unit field is not set as visible dimension in chart, or more than one unit value exists for any visible dimension value combination, they will be rendered in the chart resulting different chart layout.

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

Parameters:
{string}sUnitBinding New value for property unitBinding
Returns:
{sap.chart.data.Measure} Reference to this in order to allow method chaining
getValueFormat(): string
Gets current value of property valueFormat.

A (core UI5) format pattern to be used by the formatter to format the measure value.

Deprecated:
Please use sap.chart.Chart#setVizProperties to set related formatStrings instead.
Returns:
{string} Value of property valueFormat
setValueFormat(sValueFormat): sap.chart.data.Measure
Sets a new value for property valueFormat.

A (core UI5) format pattern to be used by the formatter to format the measure value.

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

Parameters:
{string}sValueFormat New value for property valueFormat
Deprecated:
Please use sap.chart.Chart#setVizProperties to set related formatStrings instead.
Returns:
{sap.chart.data.Measure} Reference to this in order to allow method chaining