Class sap.suite.ui.microchart.HarveyBallMicroChartModule: sap/suite/ui/microchart/HarveyBallMicroChart

extends Control

Displays a pie chart with highlighted sectors.


Since: 1.34.
Constructor Summary
new sap.suite.ui.microchart.HarveyBallMicroChart(sId?, mSettings?)The configuration of the graphic element on the chart.
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.HarveyBallMicroChart.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.microchart.HarveyBallMicroChart with name sClassName and enriches it with the information contained in oClassInfo.
sap.suite.ui.microchart.HarveyBallMicroChart.getMetadata()Returns a metadata object for class sap.suite.ui.microchart.HarveyBallMicroChart.
addItem(oItem)Adds some item to the aggregation items.
attachPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the press event of this sap.suite.ui.microchart.HarveyBallMicroChart.
bindItems(oBindingInfo)Binds aggregation items to model data.
destroyItems()Destroys all the items in the aggregation items.
detachPress(fnFunction, oListener)Detaches event handler fnFunction from the press event of this sap.suite.ui.microchart.HarveyBallMicroChart.
firePress(mArguments?)Fires event press to attached listeners.
getColorPalette()Gets current value of property colorPalette.
getFormattedLabel()Gets current value of property formattedLabel.
getIsResponsive()Gets current value of property isResponsive.
getItems()Gets content of aggregation items.
getShowFractions()Gets current value of property showFractions.
getShowTotal()Gets current value of property showTotal.
getSize()Gets current value of property size.
getTotal()Gets current value of property total.
getTotalLabel()Gets current value of property totalLabel.
getTotalScale()Gets current value of property totalScale.
getWidth()Gets current value of property width.
indexOfItem(oItem)Checks for the provided sap.suite.ui.microchart.HarveyBallMicroChartItem in the aggregation items.
insertItem(oItem, iIndex)Inserts a item into the aggregation items.
removeAllItems()Removes all the controls from the aggregation items.
removeItem(vItem)Removes a item from the aggregation items.
setColorPalette(sColorPalette)Sets a new value for property colorPalette.
setFormattedLabel(bFormattedLabel)Sets a new value for property formattedLabel.
setIsResponsive(bIsResponsive)Sets a new value for property isResponsive.
setShowFractions(bShowFractions)Sets a new value for property showFractions.
setShowTotal(bShowTotal)Sets a new value for property showTotal.
setSize(sSize)Sets a new value for property size.
setTotal(fTotal)Sets a new value for property total.
setTotalLabel(sTotalLabel)Sets a new value for property totalLabel.
setTotalScale(sTotalScale)Sets a new value for property totalScale.
setWidth(sWidth)Sets a new value for property width.
unbindItems()Unbinds aggregation items from model data.
Constructor Detail
new sap.suite.ui.microchart.HarveyBallMicroChart(sId?, mSettings?)
The configuration of the graphic element on the chart.

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.HarveyBallMicroChart.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.suite.ui.microchart.HarveyBallMicroChart 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.HarveyBallMicroChart.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.suite.ui.microchart.HarveyBallMicroChart.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Adds some item to the aggregation items.
Parameters:
{sap.suite.ui.microchart.HarveyBallMicroChartItem}oItem the item to add; if empty, nothing is inserted
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
attachPress(oData?, fnFunction, oListener?): sap.suite.ui.microchart.HarveyBallMicroChart
Attaches event handler fnFunction to the press event of this sap.suite.ui.microchart.HarveyBallMicroChart.

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.HarveyBallMicroChart 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.HarveyBallMicroChart itself
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
Binds aggregation items 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.HarveyBallMicroChart} Reference to this in order to allow method chaining
Destroys all the items in the aggregation items.
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
detachPress(fnFunction, oListener): sap.suite.ui.microchart.HarveyBallMicroChart
Detaches event handler fnFunction from the press event of this sap.suite.ui.microchart.HarveyBallMicroChart.

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.HarveyBallMicroChart} 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.HarveyBallMicroChart} Reference to this in order to allow method chaining
getColorPalette(): string[]
Gets current value of property colorPalette.

The color palette for the chart. If this property is set, semantic colors defined in HarveyBallMicroChart are ignored. Colors from the palette are assigned to each slice consequentially. When all the palette colors are used, assignment of the colors begins from the first palette color.

Default value is [].

Returns:
{string[]} Value of property colorPalette
getFormattedLabel(): boolean
Gets current value of property formattedLabel.

If set to true, the totalLabel parameter is considered as the combination of the total value and its scaling factor. The default value is false. It means that the total value and the scaling factor are defined separately by the total and the totalScale properties accordingly.

Default value is false.

Returns:
{boolean} Value of property formattedLabel
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
Gets content of aggregation items.

The set of points for this graphic element.

Returns:
{sap.suite.ui.microchart.HarveyBallMicroChartItem[]}
getShowFractions(): boolean
Gets current value of property showFractions.

If it is set to true, the fraction values are displayed next to the chart. The default setting is true.

Default value is true.

Returns:
{boolean} Value of property showFractions
getShowTotal(): boolean
Gets current value of property showTotal.

If it is set to true, the total value is displayed next to the chart. The default setting is true.

Default value is true.

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

The size of the chart. If it is not set, the default size is applied based on the device type.

Default value is Auto.

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

The total value. This is taken as 360 degrees value on the chart.

Returns:
{float} Value of property total
getTotalLabel(): string
Gets current value of property totalLabel.

The total label. If specified, it is displayed instead of the total value.

Returns:
{string} Value of property totalLabel
getTotalScale(): string
Gets current value of property totalScale.

The scaling factor that is displayed next to the total value.

Returns:
{string} Value of property totalScale
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
indexOfItem(oItem): int
Checks for the provided sap.suite.ui.microchart.HarveyBallMicroChartItem in the aggregation items. and returns its index if found or -1 otherwise.
Parameters:
{sap.suite.ui.microchart.HarveyBallMicroChartItem}oItem The item whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
Inserts a item into the aggregation items.
Parameters:
{sap.suite.ui.microchart.HarveyBallMicroChartItem}oItem the item to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.suite.ui.microchart.HarveyBallMicroChartItem[]} An array of the removed elements (might be empty)
Removes a item from the aggregation items.
Parameters:
{int|string|sap.suite.ui.microchart.HarveyBallMicroChartItem}vItem The itemto remove or its index or id
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChartItem} The removed item or null
setColorPalette(sColorPalette): sap.suite.ui.microchart.HarveyBallMicroChart
Sets a new value for property colorPalette.

The color palette for the chart. If this property is set, semantic colors defined in HarveyBallMicroChart are ignored. Colors from the palette are assigned to each slice consequentially. When all the palette colors are used, assignment of the colors begins from the first palette color.

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

Default value is [].

Parameters:
{string[]}sColorPalette New value for property colorPalette
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
setFormattedLabel(bFormattedLabel): sap.suite.ui.microchart.HarveyBallMicroChart
Sets a new value for property formattedLabel.

If set to true, the totalLabel parameter is considered as the combination of the total value and its scaling factor. The default value is false. It means that the total value and the scaling factor are defined separately by the total and the totalScale properties accordingly.

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

Default value is false.

Parameters:
{boolean}bFormattedLabel New value for property formattedLabel
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
setIsResponsive(bIsResponsive): sap.suite.ui.microchart.HarveyBallMicroChart
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.HarveyBallMicroChart} Reference to this in order to allow method chaining
setShowFractions(bShowFractions): sap.suite.ui.microchart.HarveyBallMicroChart
Sets a new value for property showFractions.

If it is set to true, the fraction values are displayed next to the chart. The default setting is true.

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

Default value is true.

Parameters:
{boolean}bShowFractions New value for property showFractions
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
Sets a new value for property showTotal.

If it is set to true, the total value is displayed next to the chart. The default setting is true.

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

Default value is true.

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

The size of the chart. If it is not set, the default size is applied based on the device type.

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.HarveyBallMicroChart} Reference to this in order to allow method chaining
Sets a new value for property total.

The total value. This is taken as 360 degrees value on the chart.

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

Parameters:
{float}fTotal New value for property total
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
Sets a new value for property totalLabel.

The total label. If specified, it is displayed instead of the total value.

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

Parameters:
{string}sTotalLabel New value for property totalLabel
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining
Sets a new value for property totalScale.

The scaling factor that is displayed next to the total value.

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

Parameters:
{string}sTotalScale New value for property totalScale
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} 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.HarveyBallMicroChart} Reference to this in order to allow method chaining
Unbinds aggregation items from model data.
Returns:
{sap.suite.ui.microchart.HarveyBallMicroChart} Reference to this in order to allow method chaining