Displays a pie chart with highlighted sectors.
Since: 1.34.
Event Summary
press(oControlEvent)The event is triggered when the chart is pressed. Method Summary
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. getItems()Gets content of aggregation items
. getSize()Gets current value of property size
. getTotal()Gets current value of property total
. 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
. removeItem(vItem)Removes a item from the aggregation items
. 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. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty 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:
- Properties
- Aggregations
- items : sap.suite.ui.microchart.HarveyBallMicroChartItem[] (default)
- 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.
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:
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 |
Returns a metadata object for class sap.suite.ui.microchart.HarveyBallMicroChart.
Returns:
Adds some item to the aggregation items
.
Parameters:
Returns:
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:
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
Destroys all the items in the aggregation items
.
Returns:
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:
Fires event press
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
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:
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 |
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:
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 |
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:
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:
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:
Removes all the controls from the aggregation
items
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a item from the aggregation items
.
Parameters:
Returns:
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:
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:
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:
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:
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:
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:
Returns:
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:
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:
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:
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:
Returns:
Unbinds aggregation items
from model data.
Returns: