Class sap.viz.ui5.types.DatalabelModule: sap/viz/ui5/types/Datalabel


Module sap.viz.ui5.types.Datalabel

Deprecated API:Since version 1.32.0. The chart controls in the sap.viz.ui5 package (which were always marked as experimental) have been deprecated since 1.32.0. They are no longer actively developed and won't receive new features or improvements, only important bug fixes. They will only remain in the SAPUI5 distribution for backward compatibility.

SAP strongly recommends that existing consumers of those controls migrate to the new VizFrame control to benefit from new charting enhancements and timely support.

Note: As the feature set, design and API usage of VizFrame might differ from the old chart controls, make sure you evaluate it thoroughly before migration.

Experimental API:Since version 1.7.2. Charting API is not finished yet and might change completely.


Since: 1.7.2.
Constructor Summary
new sap.viz.ui5.types.Datalabel(sId?, mSettings?)Constructor for a new sap.viz.ui5.types.Datalabel

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.

Method Summary
sap.viz.ui5.types.Datalabel.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.viz.ui5.types.Datalabel with name sClassName and enriches it with the information contained in oClassInfo.
sap.viz.ui5.types.Datalabel.getMetadata()Returns a metadata object for class sap.viz.ui5.types.Datalabel.
getFormatString()Gets current value of property formatString.
getHideWhenOverlap()Gets current value of property hideWhenOverlap.
getVisible()Gets current value of property visible.
setFormatString(sFormatString)Sets a new value for property formatString.
setHideWhenOverlap(bHideWhenOverlap)Sets a new value for property hideWhenOverlap.
setVisible(bVisible)Sets a new value for property visible.
getAutomaticInOutside()Gets current value of property automaticInOutside.
getIsBubbleChart()Gets current value of property isBubbleChart.
getIsDonut()Gets current value of property isDonut.
getIsGeoChart()Gets current value of property isGeoChart.
getIsPercentMode()Gets current value of property isPercentMode.
getIsStackMode()Gets current value of property isStackMode.
getOrientation()Gets current value of property orientation.
getOutsidePosition()Gets current value of property outsidePosition.
getOutsideVisible()Gets current value of property outsideVisible.
getPaintingMode()Gets current value of property paintingMode.
getPosition()Gets current value of property position.
getPositionPreference()Gets current value of property positionPreference.
getRespectShapeWidth()Gets current value of property respectShapeWidth.
getShowZero()Gets current value of property showZero.
getType()Gets current value of property type.
setAutomaticInOutside(bAutomaticInOutside)Sets a new value for property automaticInOutside.
setIsBubbleChart(bIsBubbleChart)Sets a new value for property isBubbleChart.
setIsDonut(bIsDonut)Sets a new value for property isDonut.
setIsGeoChart(bIsGeoChart)Sets a new value for property isGeoChart.
setIsPercentMode(bIsPercentMode)Sets a new value for property isPercentMode.
setIsStackMode(bIsStackMode)Sets a new value for property isStackMode.
setOrientation(sOrientation)Sets a new value for property orientation.
setOutsidePosition(sOutsidePosition)Sets a new value for property outsidePosition.
setOutsideVisible(bOutsideVisible)Sets a new value for property outsideVisible.
setPaintingMode(sPaintingMode)Sets a new value for property paintingMode.
setPosition(sPosition)Sets a new value for property position.
setPositionPreference(bPositionPreference)Sets a new value for property positionPreference.
setRespectShapeWidth(bRespectShapeWidth)Sets a new value for property respectShapeWidth.
setShowZero(bShowZero)Sets a new value for property showZero.
setType(sType)Sets a new value for property type.
Constructor Detail
new sap.viz.ui5.types.Datalabel(sId?, mSettings?)
Constructor for a new sap.viz.ui5.types.Datalabel

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.viz.ui5.core.BaseStructuredType 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
Deprecated:
Since version 1.32.0. The chart controls in the sap.viz.ui5 package (which were always marked as experimental) have been deprecated since 1.32.0. They are no longer actively developed and won't receive new features or improvements, only important bug fixes. They will only remain in the SAPUI5 distribution for backward compatibility.

SAP strongly recommends that existing consumers of those controls migrate to the new VizFrame control to benefit from new charting enhancements and timely support.

Note: As the feature set, design and API usage of VizFrame might differ from the old chart controls, make sure you evaluate it thoroughly before migration.

Method Detail
sap.viz.ui5.types.Datalabel.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.viz.ui5.types.Datalabel with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.viz.ui5.core.BaseStructuredType.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.viz.ui5.types.Datalabel.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.viz.ui5.types.Datalabel.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getFormatString(): any[]
Gets current value of property formatString.

Set the format strings for the data labels. For dual axis charts, the first array is applied to the primary axis and the second array is applied to the second axis. If you enter fewer format strings into an array than there are measures in the respective axis, then the last format string is applied to all remaining measures. The following characters are reserved as tokens for format code: MDYHSAmdyhsa#?%0@. The following is a simple example: [["0.00%"],["0.00%"]].

Returns:
{any[]} Value of property formatString
getHideWhenOverlap(): boolean
Gets current value of property hideWhenOverlap.

Always show all data labels even they are overlapped

Default value is true.

Returns:
{boolean} Value of property hideWhenOverlap
getVisible(): boolean
Gets current value of property visible.

Set whether the data labels are visible

Default value is false.

Returns:
{boolean} Value of property visible
setFormatString(sFormatString): sap.viz.ui5.types.Datalabel
Sets a new value for property formatString.

Set the format strings for the data labels. For dual axis charts, the first array is applied to the primary axis and the second array is applied to the second axis. If you enter fewer format strings into an array than there are measures in the respective axis, then the last format string is applied to all remaining measures. The following characters are reserved as tokens for format code: MDYHSAmdyhsa#?%0@. The following is a simple example: [["0.00%"],["0.00%"]].

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

Parameters:
{any[]}sFormatString New value for property formatString
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setHideWhenOverlap(bHideWhenOverlap): sap.viz.ui5.types.Datalabel
Sets a new value for property hideWhenOverlap.

Always show all data labels even they are overlapped

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

Default value is true.

Parameters:
{boolean}bHideWhenOverlap New value for property hideWhenOverlap
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setVisible(bVisible): sap.viz.ui5.types.Datalabel
Sets a new value for property visible.

Set whether the data labels are visible

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

Default value is false.

Parameters:
{boolean}bVisible New value for property visible
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
getAutomaticInOutside(): boolean
Gets current value of property automaticInOutside.

If set to 'true', the data labels will be automatically placed outside when the data label position property is inside, and vice versa

Default value is true.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property automaticInOutside
getIsBubbleChart(): boolean
Gets current value of property isBubbleChart.

Set whether the chart is a bubble chart

Default value is false.

Deprecated:
Since version 1.22. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property isBubbleChart
getIsDonut(): boolean
Gets current value of property isDonut.

Set whether the chart is a donut chart. Use only for donut charts.

Default value is false.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property isDonut
getIsGeoChart(): boolean
Gets current value of property isGeoChart.

Set whether the chart is a geo chart

Default value is false.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property isGeoChart
getIsPercentMode(): boolean
Gets current value of property isPercentMode.

Set whether the chart is a percent chart. Set for percent chart only.

Default value is false.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property isPercentMode
getIsStackMode(): boolean
Gets current value of property isStackMode.

Set whether the chart is a stack chart. Set for stack chart only.

Default value is false.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property isStackMode
Gets current value of property orientation.

Set orientation of data labels

Default value is vertical.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel_orientation} Value of property orientation
Gets current value of property outsidePosition.

If set to 'true', the data label is positioned above the element when it is outside

Default value is up.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel_outsidePosition} Value of property outsidePosition
getOutsideVisible(): boolean
Gets current value of property outsideVisible.

If set to 'true', the data label is visible when it is outside

Default value is true.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property outsideVisible
Gets current value of property paintingMode.

Set painting mode of data labels

Default value is rectCoordinate.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel_paintingMode} Value of property paintingMode
Gets current value of property position.

Set position of data labels

Default value is inside.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel_position} Value of property position
getPositionPreference(): boolean
Gets current value of property positionPreference.

If set to 'true', the data label position is defined by the property 'outsidePosition', regardless of whether the data label value is negative

Default value is false.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property positionPreference
getRespectShapeWidth(): boolean
Gets current value of property respectShapeWidth.

If set to 'true', the data label is automatically hidden when bubble width isn't enough to show the whole label in single bubble chart.

Default value is false.

Deprecated:
Since version 1.20. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property respectShapeWidth
getShowZero(): boolean
Gets current value of property showZero.

If set to 'true', the value zero is shown in the data labels

Default value is true.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{boolean} Value of property showZero
getType(): string
Gets current value of property type.

Set the type of label

Default value is value.

Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{string} Value of property type
setAutomaticInOutside(bAutomaticInOutside): sap.viz.ui5.types.Datalabel
Sets a new value for property automaticInOutside.

If set to 'true', the data labels will be automatically placed outside when the data label position property is inside, and vice versa

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

Default value is true.

Parameters:
{boolean}bAutomaticInOutside New value for property automaticInOutside
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setIsBubbleChart(bIsBubbleChart): sap.viz.ui5.types.Datalabel
Sets a new value for property isBubbleChart.

Set whether the chart is a bubble chart

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

Default value is false.

Parameters:
{boolean}bIsBubbleChart New value for property isBubbleChart
Deprecated:
Since version 1.22. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setIsDonut(bIsDonut): sap.viz.ui5.types.Datalabel
Sets a new value for property isDonut.

Set whether the chart is a donut chart. Use only for donut charts.

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

Default value is false.

Parameters:
{boolean}bIsDonut New value for property isDonut
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setIsGeoChart(bIsGeoChart): sap.viz.ui5.types.Datalabel
Sets a new value for property isGeoChart.

Set whether the chart is a geo chart

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

Default value is false.

Parameters:
{boolean}bIsGeoChart New value for property isGeoChart
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setIsPercentMode(bIsPercentMode): sap.viz.ui5.types.Datalabel
Sets a new value for property isPercentMode.

Set whether the chart is a percent chart. Set for percent chart only.

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

Default value is false.

Parameters:
{boolean}bIsPercentMode New value for property isPercentMode
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setIsStackMode(bIsStackMode): sap.viz.ui5.types.Datalabel
Sets a new value for property isStackMode.

Set whether the chart is a stack chart. Set for stack chart only.

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

Default value is false.

Parameters:
{boolean}bIsStackMode New value for property isStackMode
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setOrientation(sOrientation): sap.viz.ui5.types.Datalabel
Sets a new value for property orientation.

Set orientation of data labels

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

Default value is vertical.

Parameters:
{sap.viz.ui5.types.Datalabel_orientation}sOrientation New value for property orientation
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setOutsidePosition(sOutsidePosition): sap.viz.ui5.types.Datalabel
Sets a new value for property outsidePosition.

If set to 'true', the data label is positioned above the element when it is outside

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

Default value is up.

Parameters:
{sap.viz.ui5.types.Datalabel_outsidePosition}sOutsidePosition New value for property outsidePosition
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setOutsideVisible(bOutsideVisible): sap.viz.ui5.types.Datalabel
Sets a new value for property outsideVisible.

If set to 'true', the data label is visible when it is outside

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

Default value is true.

Parameters:
{boolean}bOutsideVisible New value for property outsideVisible
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setPaintingMode(sPaintingMode): sap.viz.ui5.types.Datalabel
Sets a new value for property paintingMode.

Set painting mode of data labels

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

Default value is rectCoordinate.

Parameters:
{sap.viz.ui5.types.Datalabel_paintingMode}sPaintingMode New value for property paintingMode
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setPosition(sPosition): sap.viz.ui5.types.Datalabel
Sets a new value for property position.

Set position of data labels

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

Default value is inside.

Parameters:
{sap.viz.ui5.types.Datalabel_position}sPosition New value for property position
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setPositionPreference(bPositionPreference): sap.viz.ui5.types.Datalabel
Sets a new value for property positionPreference.

If set to 'true', the data label position is defined by the property 'outsidePosition', regardless of whether the data label value is negative

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

Default value is false.

Parameters:
{boolean}bPositionPreference New value for property positionPreference
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setRespectShapeWidth(bRespectShapeWidth): sap.viz.ui5.types.Datalabel
Sets a new value for property respectShapeWidth.

If set to 'true', the data label is automatically hidden when bubble width isn't enough to show the whole label in single bubble chart.

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

Default value is false.

Parameters:
{boolean}bRespectShapeWidth New value for property respectShapeWidth
Deprecated:
Since version 1.20. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
setShowZero(bShowZero): sap.viz.ui5.types.Datalabel
Sets a new value for property showZero.

If set to 'true', the value zero is shown in the data labels

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

Default value is true.

Parameters:
{boolean}bShowZero New value for property showZero
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining
Sets a new value for property type.

Set the type of label

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

Default value is value.

Parameters:
{string}sType New value for property type
Deprecated:
Since version 1.12. This Property has been deprecated. This interface will be removed from the SAPUI5 delivery in one of the next releases.
Returns:
{sap.viz.ui5.types.Datalabel} Reference to this in order to allow method chaining