Class sap.m.NumericContentModule: sap/m/NumericContent
Shows numeric values used for example in tiles colored according to their meaning and displays deviations.
Since: 1.34.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the press
event of this sap.m.NumericContent
.fnFunction
from the press
event of this sap.m.NumericContent
. 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:
- Properties
- animateTextChange : boolean (default: true)
- formatterValue : boolean (default: false)
- icon : sap.ui.core.URI
- iconDescription : string
- indicator : sap.m.DeviationIndicator (default: None)
- nullifyValue : boolean (default: true)
- scale : string
- size : sap.m.Size (default: Auto)
- truncateValueTo : int (default: 4)
- value : string
- valueColor : sap.m.ValueColor (default: Neutral)
- width : sap.ui.core.CSSSize
- withMargin : boolean (default: true)
- state : sap.m.LoadState (default: Loaded)
- Events
- press : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
{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 |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
fnFunction
to the press
event of this sap.m.NumericContent
. When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.NumericContent
itself.
The event is fired when the user chooses the numeric content.
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.NumericContent itself |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
fnFunction
from the press
event of this sap.m.NumericContent
. The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
press
to attached listeners. {Map} | mArguments? | The arguments to pass along with the event |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
animateTextChange
. If set to true, the change of the value will be animated.
Default value is true
.
{boolean} | Value of property animateTextChange |
formatterValue
. If set to true, the value parameter contains a numeric value and scale. If set to false (default), the value parameter contains a numeric value only.
Default value is false
.
{boolean} | Value of property formatterValue |
icon
. The icon to be displayed as a graphical element within the control. This can be an image or an icon from the icon font.
{sap.ui.core.URI} | Value of property icon |
iconDescription
. Description of an icon that is used in the tooltip.
{string} | Value of property iconDescription |
indicator
. The indicator arrow that shows value deviation.
Default value is None
.
{sap.m.DeviationIndicator} | Value of property indicator |
nullifyValue
. If set to true, the omitted value property is set to 0.
Default value is true
.
{boolean} | Value of property nullifyValue |
scale
. The scaling prefix. Financial characters can be used for currencies and counters. The SI prefixes can be used for units. If the scaling prefix contains more than three characters, only the first three characters are displayed.
{string} | Value of property scale |
state
. Indicates the load status.
Default value is Loaded
.
{sap.m.LoadState} | Value of property state |
truncateValueTo
. The number of characters to display for the value property.
Default value is 4
.
{int} | Value of property truncateValueTo |
value
. The actual value.
{string} | Value of property value |
valueColor
. The semantic color of the value.
Default value is Neutral
.
{sap.m.ValueColor} | Value of property valueColor |
width
. The width of the control. If it is not set, the size of the control is defined by the 'size' property.
{sap.ui.core.CSSSize} | Value of property width |
withMargin
. If the value is set to false, the content will fit to the whole size of the control.
Default value is true
.
{boolean} | Value of property withMargin |
animateTextChange
. If set to true, the change of the value will be animated.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bAnimateTextChange | New value for property animateTextChange |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
formatterValue
. If set to true, the value parameter contains a numeric value and scale. If set to false (default), the value parameter contains a numeric value only.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
{boolean} | bFormatterValue | New value for property formatterValue |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
icon
. The icon to be displayed as a graphical element within the control. This can be an image or an icon from the icon font.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.URI} | sIcon | New value for property icon |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
iconDescription
. Description of an icon that is used in the tooltip.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sIconDescription | New value for property iconDescription |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
indicator
. The indicator arrow that shows value deviation.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
{sap.m.DeviationIndicator} | sIndicator | New value for property indicator |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
nullifyValue
. If set to true, the omitted value property is set to 0.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bNullifyValue | New value for property nullifyValue |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
scale
. The scaling prefix. Financial characters can be used for currencies and counters. The SI prefixes can be used for units. If the scaling prefix contains more than three characters, only the first three characters are displayed.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sScale | New value for property scale |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
state
. Indicates the load status.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Loaded
.
{sap.m.LoadState} | sState | New value for property state |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
truncateValueTo
. The number of characters to display for the value property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 4
.
{int} | iTruncateValueTo | New value for property truncateValueTo |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
value
. The actual value.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sValue | New value for property value |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
valueColor
. The semantic color of the value.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Neutral
.
{sap.m.ValueColor} | sValueColor | New value for property valueColor |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
width
. The width of the control. If it is not set, the size of the control is defined by the 'size' property.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.CSSSize} | sWidth | New value for property width |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
withMargin
. If the value is set to false, the content will fit to the whole size of the control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bWithMargin | New value for property withMargin |
{sap.m.NumericContent} | Reference to this in order to allow method chaining |
size
. Updates the size of the control. If not set then the default size is applied based on the device tile.
Default value is Auto
.
- Deprecated:
- Since version 1.38.0. The NumericContent control has now a fixed size, depending on the used media (desktop, tablet or phone).
{sap.m.Size} | Value of property size |
size
. Updates the size of the control. If not set then the default size is applied based on the device tile.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Auto
.
{sap.m.Size} | sSize | New value for property size |
- Deprecated:
- Since version 1.38.0. The NumericContent control has now a fixed size, depending on the used media (desktop, tablet or phone).
{sap.m.NumericContent} | Reference to this in order to allow method chaining |