Class sap.suite.ui.microchart.BulletMicroChartModule: sap/suite/ui/microchart/BulletMicroChart

extends Control

Displays a colored horizontal bar representing a current value on top of a background bar representing the compared value. The vertical bars can represent the numeric values, the scaling factors, the thresholds, and the target values. This control replaces the deprecated sap.suite.ui.commons.BulletChart.


Since: 1.34.
Constructor Summary
new sap.suite.ui.microchart.BulletMicroChart(sId?, mSettings?)Constructor for a new BulletMicroChart control.
Event Summary
press(oControlEvent)The event is triggered when the chart is pressed.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.suite.ui.microchart.BulletMicroChart.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.microchart.BulletMicroChart with name sClassName and enriches it with the information contained in oClassInfo.
sap.suite.ui.microchart.BulletMicroChart.getMetadata()Returns a metadata object for class sap.suite.ui.microchart.BulletMicroChart.
addThreshold(oThreshold)Adds some threshold to the aggregation thresholds.
attachPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the press event of this sap.suite.ui.microchart.BulletMicroChart.
bindActual(oBindingInfo)Binds aggregation actual to model data.
bindThresholds(oBindingInfo)Binds aggregation thresholds to model data.
destroyActual()Destroys the actual in the aggregation actual.
destroyThresholds()Destroys all the thresholds in the aggregation thresholds.
detachPress(fnFunction, oListener)Detaches event handler fnFunction from the press event of this sap.suite.ui.microchart.BulletMicroChart.
firePress(mArguments?)Fires event press to attached listeners.
getActual()Gets content of aggregation actual.
getActualValueLabel()Gets current value of property actualValueLabel.
getDeltaValueLabel()Gets current value of property deltaValueLabel.
getForecastValue()Gets current value of property forecastValue.
getIsResponsive()Gets current value of property isResponsive.
getMaxValue()Gets current value of property maxValue.
getMinValue()Gets current value of property minValue.
getMode()Gets current value of property mode.
getScale()Gets current value of property scale.
getScaleColor()Gets current value of property scaleColor.
getShowActualValue()Gets current value of property showActualValue.
getShowDeltaValue()Gets current value of property showDeltaValue.
getShowTargetValue()Gets current value of property showTargetValue.
getShowValueMarker()Gets current value of property showValueMarker.
getSize()Gets current value of property size.
getTargetValue()Gets current value of property targetValue.
getTargetValueLabel()Gets current value of property targetValueLabel.
getThresholds()Gets content of aggregation thresholds.
getWidth()Gets current value of property width.
indexOfThreshold(oThreshold)Checks for the provided sap.suite.ui.microchart.BulletMicroChartData in the aggregation thresholds.
insertThreshold(oThreshold, iIndex)Inserts a threshold into the aggregation thresholds.
removeAllThresholds()Removes all the controls from the aggregation thresholds.
removeThreshold(vThreshold)Removes a threshold from the aggregation thresholds.
setActual(oActual)Sets the aggregated actual.
setActualValueLabel(sActualValueLabel)Sets a new value for property actualValueLabel.
setDeltaValueLabel(sDeltaValueLabel)Sets a new value for property deltaValueLabel.
setForecastValue(fForecastValue)Sets a new value for property forecastValue.
setIsResponsive(bIsResponsive)Sets a new value for property isResponsive.
setMaxValue(fMaxValue)Sets a new value for property maxValue.
setMinValue(fMinValue)Sets a new value for property minValue.
setMode(sMode)Sets a new value for property mode.
setScale(sScale)Sets a new value for property scale.
setScaleColor(sScaleColor)Sets a new value for property scaleColor.
setShowActualValue(bShowActualValue)Sets a new value for property showActualValue.
setShowDeltaValue(bShowDeltaValue)Sets a new value for property showDeltaValue.
setShowTargetValue(bShowTargetValue)Sets a new value for property showTargetValue.
setShowValueMarker(bShowValueMarker)Sets a new value for property showValueMarker.
setSize(sSize)Sets a new value for property size.
setTargetValue(fTargetValue)Sets a new value for property targetValue.
setTargetValueLabel(sTargetValueLabel)Sets a new value for property targetValueLabel.
setWidth(sWidth)Sets a new value for property width.
unbindActual()Unbinds aggregation actual from model data.
unbindThresholds()Unbinds aggregation thresholds from model data.
Constructor Detail
new sap.suite.ui.microchart.BulletMicroChart(sId?, mSettings?)
Constructor for a new BulletMicroChart control.

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.Control 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
Event Detail
press(oControlEvent)
The event is triggered when the chart is pressed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.suite.ui.microchart.BulletMicroChart.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.suite.ui.microchart.BulletMicroChart 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.Control.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.suite.ui.microchart.BulletMicroChart.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.suite.ui.microchart.BulletMicroChart.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addThreshold(oThreshold): sap.suite.ui.microchart.BulletMicroChart
Adds some threshold to the aggregation thresholds.
Parameters:
{sap.suite.ui.microchart.BulletMicroChartData}oThreshold the threshold to add; if empty, nothing is inserted
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
attachPress(oData?, fnFunction, oListener?): sap.suite.ui.microchart.BulletMicroChart
Attaches event handler fnFunction to the press event of this sap.suite.ui.microchart.BulletMicroChart.

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.suite.ui.microchart.BulletMicroChart itself.

The event is triggered when the chart is pressed.

Parameters:
{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.suite.ui.microchart.BulletMicroChart itself
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
bindActual(oBindingInfo): sap.suite.ui.microchart.BulletMicroChart
Binds aggregation actual to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
bindThresholds(oBindingInfo): sap.suite.ui.microchart.BulletMicroChart
Binds aggregation thresholds to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Destroys the actual in the aggregation actual.
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Destroys all the thresholds in the aggregation thresholds.
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
detachPress(fnFunction, oListener): sap.suite.ui.microchart.BulletMicroChart
Detaches event handler fnFunction from the press event of this sap.suite.ui.microchart.BulletMicroChart.

The passed function and listener object must match the ones used for event registration.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Fires event press to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Gets content of aggregation actual.

Actual data of the BulletMicroChart.

Returns:
{sap.suite.ui.microchart.BulletMicroChartData}
getActualValueLabel(): string
Gets current value of property actualValueLabel.

If set, displays a specified label instead of the numeric actual value.

Default value is .

Returns:
{string} Value of property actualValueLabel
getDeltaValueLabel(): string
Gets current value of property deltaValueLabel.

If set, displays a specified label instead of the calculated numeric delta value.

Default value is .

Returns:
{string} Value of property deltaValueLabel
getForecastValue(): float
Gets current value of property forecastValue.

The forecast value that is displayed in Actual mode only. If set, the forecast value bar appears in the background of the actual value bar.

Returns:
{float} Value of property forecastValue
getIsResponsive(): boolean
Gets current value of property isResponsive.

If this set to true, width and height of the control are determined by the width and height of the container in which the control is placed. Size and Width properties are ignored in such case.

Default value is false.

Since:
1.38.0
Returns:
{boolean} Value of property isResponsive
getMaxValue(): float
Gets current value of property maxValue.

The maximum scale value for the bar chart used for defining a fixed size of the scale in different instances of this control.

Returns:
{float} Value of property maxValue
getMinValue(): float
Gets current value of property minValue.

The minimum scale value for the bar chart used for defining a fixed size of the scale in different instances of this control.

Returns:
{float} Value of property minValue
Gets current value of property mode.

The mode of displaying the actual value itself or the delta between the actual value and the target value. If not set, the actual value is displayed.

Default value is Actual.

Returns:
{sap.suite.ui.microchart.BulletMicroChartModeType} Value of property mode
getScale(): string
Gets current value of property scale.

The scaling suffix that is added to the actual and target values.

Default value is .

Returns:
{string} Value of property scale
Gets current value of property scaleColor.

The background color of the scale.

Default value is MediumLight.

Returns:
{sap.suite.ui.microchart.CommonBackgroundType} Value of property scaleColor
getShowActualValue(): boolean
Gets current value of property showActualValue.

If set to true, shows the numeric actual value. This property works in Actual mode only.

Default value is true.

Returns:
{boolean} Value of property showActualValue
getShowDeltaValue(): boolean
Gets current value of property showDeltaValue.

If set to true, shows the calculated delta value instead of the numeric actual value regardless of the showActualValue setting. This property works in Delta mode only.

Default value is true.

Returns:
{boolean} Value of property showDeltaValue
getShowTargetValue(): boolean
Gets current value of property showTargetValue.

If set to true, shows the numeric target value.

Default value is true.

Returns:
{boolean} Value of property showTargetValue
getShowValueMarker(): boolean
Gets current value of property showValueMarker.

If set to true, shows the value marker.

Default value is false.

Returns:
{boolean} Value of property showValueMarker
getSize(): sap.m.Size
Gets current value of property size.

The size of the microchart. If not set, the default size is applied based on the size of the device tile.

Default value is Auto.

Returns:
{sap.m.Size} Value of property size
getTargetValue(): float
Gets current value of property targetValue.

The target value that is displayed as a black vertical bar.

Returns:
{float} Value of property targetValue
getTargetValueLabel(): string
Gets current value of property targetValueLabel.

If set, displays a specified label instead of the numeric target value.

Default value is .

Returns:
{string} Value of property targetValueLabel
Gets content of aggregation thresholds.

Threshold data of the BulletMicroChart.

Returns:
{sap.suite.ui.microchart.BulletMicroChartData[]}
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

The width of the chart. If it is not set, the size of the control is defined by the size property.

Returns:
{sap.ui.core.CSSSize} Value of property width
indexOfThreshold(oThreshold): int
Checks for the provided sap.suite.ui.microchart.BulletMicroChartData in the aggregation thresholds. and returns its index if found or -1 otherwise.
Parameters:
{sap.suite.ui.microchart.BulletMicroChartData}oThreshold The threshold whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertThreshold(oThreshold, iIndex): sap.suite.ui.microchart.BulletMicroChart
Inserts a threshold into the aggregation thresholds.
Parameters:
{sap.suite.ui.microchart.BulletMicroChartData}oThreshold the threshold to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the threshold should be inserted at; for a negative value of iIndex, the threshold is inserted at position 0; for a value greater than the current size of the aggregation, the threshold is inserted at the last position
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Removes all the controls from the aggregation thresholds.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.suite.ui.microchart.BulletMicroChartData[]} An array of the removed elements (might be empty)
removeThreshold(vThreshold): sap.suite.ui.microchart.BulletMicroChartData
Removes a threshold from the aggregation thresholds.
Parameters:
{int|string|sap.suite.ui.microchart.BulletMicroChartData}vThreshold The thresholdto remove or its index or id
Returns:
{sap.suite.ui.microchart.BulletMicroChartData} The removed threshold or null
Sets the aggregated actual.
Parameters:
{sap.suite.ui.microchart.BulletMicroChartData}oActual The actual to set
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setActualValueLabel(sActualValueLabel): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property actualValueLabel.

If set, displays a specified label instead of the numeric actual value.

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

Default value is .

Parameters:
{string}sActualValueLabel New value for property actualValueLabel
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setDeltaValueLabel(sDeltaValueLabel): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property deltaValueLabel.

If set, displays a specified label instead of the calculated numeric delta value.

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

Default value is .

Parameters:
{string}sDeltaValueLabel New value for property deltaValueLabel
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setForecastValue(fForecastValue): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property forecastValue.

The forecast value that is displayed in Actual mode only. If set, the forecast value bar appears in the background of the actual value bar.

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

Parameters:
{float}fForecastValue New value for property forecastValue
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setIsResponsive(bIsResponsive): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property isResponsive.

If this set to true, width and height of the control are determined by the width and height of the container in which the control is placed. Size and Width properties are ignored in such case.

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

Default value is false.

Parameters:
{boolean}bIsResponsive New value for property isResponsive
Since:
1.38.0
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Sets a new value for property maxValue.

The maximum scale value for the bar chart used for defining a fixed size of the scale in different instances of this control.

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

Parameters:
{float}fMaxValue New value for property maxValue
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Sets a new value for property minValue.

The minimum scale value for the bar chart used for defining a fixed size of the scale in different instances of this control.

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

Parameters:
{float}fMinValue New value for property minValue
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Sets a new value for property mode.

The mode of displaying the actual value itself or the delta between the actual value and the target value. If not set, the actual value is displayed.

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

Default value is Actual.

Parameters:
{sap.suite.ui.microchart.BulletMicroChartModeType}sMode New value for property mode
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Sets a new value for property scale.

The scaling suffix that is added to the actual and target values.

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

Default value is .

Parameters:
{string}sScale New value for property scale
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setScaleColor(sScaleColor): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property scaleColor.

The background color of the scale.

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

Default value is MediumLight.

Parameters:
{sap.suite.ui.microchart.CommonBackgroundType}sScaleColor New value for property scaleColor
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setShowActualValue(bShowActualValue): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property showActualValue.

If set to true, shows the numeric actual value. This property works in Actual mode only.

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

Default value is true.

Parameters:
{boolean}bShowActualValue New value for property showActualValue
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setShowDeltaValue(bShowDeltaValue): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property showDeltaValue.

If set to true, shows the calculated delta value instead of the numeric actual value regardless of the showActualValue setting. This property works in Delta mode only.

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

Default value is true.

Parameters:
{boolean}bShowDeltaValue New value for property showDeltaValue
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setShowTargetValue(bShowTargetValue): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property showTargetValue.

If set to true, shows the numeric target value.

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

Default value is true.

Parameters:
{boolean}bShowTargetValue New value for property showTargetValue
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setShowValueMarker(bShowValueMarker): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property showValueMarker.

If set to true, shows the value marker.

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

Default value is false.

Parameters:
{boolean}bShowValueMarker New value for property showValueMarker
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Sets a new value for property size.

The size of the microchart. If not set, the default size is applied based on the size of 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.

Parameters:
{sap.m.Size}sSize New value for property size
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setTargetValue(fTargetValue): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property targetValue.

The target value that is displayed as a black vertical bar.

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

Parameters:
{float}fTargetValue New value for property targetValue
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
setTargetValueLabel(sTargetValueLabel): sap.suite.ui.microchart.BulletMicroChart
Sets a new value for property targetValueLabel.

If set, displays a specified label instead of the numeric target value.

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

Default value is .

Parameters:
{string}sTargetValueLabel New value for property targetValueLabel
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Sets a new value for property width.

The width of the chart. 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.

Parameters:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Unbinds aggregation actual from model data.
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining
Unbinds aggregation thresholds from model data.
Returns:
{sap.suite.ui.microchart.BulletMicroChart} Reference to this in order to allow method chaining