The SmartMicroChart control creates a chart based on OData metadata and the configuration specified by mSettings
. The entitySet property must be specified in order to use the control. This property is used to fetch metadata and annotation information from the given default OData model. Depending on the UI/ChartType annotation, the control creates a corresponding SmartBulletMicroChart
or SmartAreaMicroChart
instance and delegates to the internal control.
Note: Most of the attributes are not dynamic and cannot be changed once the control has been initialized.
Since: 1.38.
Event Summary
initialize(oControlEvent)Event fired once the control has been initialized. Method Summary
attachInitialize(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the initialize
event of this sap.ui.comp.smartmicrochart.SmartMicroChart
. detachInitialize(fnFunction, oListener)Detaches event handler fnFunction
from the initialize
event of this sap.ui.comp.smartmicrochart.SmartMicroChart
. fireInitialize(mArguments?)Fires event initialize
to attached listeners. getChartDescription()ID of the element which is the current target of the association chartDescription
, or null
. getChartTitle()ID of the element which is the current target of the association chartTitle
, or null
. getHeight()Gets current value of property height
. getUnitOfMeasure()ID of the element which is the current target of the association unitOfMeasure
, or null
. getWidth()Gets current value of property width
. setEntitySet(sEntitySet)Sets a new value for property entitySet
. setHeight(sHeight)Sets a new value for property height
. setShowLabel(bShowLabel)Sets a new value for property showLabel
. setWidth(sWidth)Sets a new value for property width
. 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.ui.comp.smartmicrochart.SmartMicroChart(sId?, mSettings?)
Constructor for a new sap.ui.comp.smartmicrochart/SmartMicroChart.
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
- Events
- initialize : 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
initialize(oControlEvent)
Event fired once the control has been initialized.
Parameters:
Method Detail
sap.ui.comp.smartmicrochart.SmartMicroChart.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.smartmicrochart.SmartMicroChart 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.ui.comp.smartmicrochart.SmartMicroChart.
Returns:
Attaches event handler
fnFunction
to the
initialize
event of this
sap.ui.comp.smartmicrochart.SmartMicroChart
.
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.ui.comp.smartmicrochart.SmartMicroChart
itself.
Event fired once the control has been initialized.
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.ui.comp.smartmicrochart.SmartMicroChart itself |
Returns:
Detaches event handler
fnFunction
from the
initialize
event of this
sap.ui.comp.smartmicrochart.SmartMicroChart
.
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 initialize
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getChartBindingPath(): string
Gets current value of property
chartBindingPath
.
This attribute can be used to specify the path that is used during the binding of the chart. If not specified, the entitySet attribute is used instead and also stored in this property. Calling bindElement
binds the control and sets this property.
Returns:
{string} | Value of property chartBindingPath |
ID of the element which is the current target of the association chartDescription
, or null
.
Returns:
ID of the element which is the current target of the association chartTitle
, or null
.
Returns:
getChartType(): string
Gets current value of property
chartType
.
Specifies the type of chart. Note that this property is read-only.
Returns:
{string} | Value of property chartType |
getEnableAutoBinding(): boolean
Gets current value of property
enableAutoBinding
.
If set to true
, this enables automatic binding of the chart using the chartBindingPath (if it exists) or entitySet property.
Default value is false
.
Returns:
{boolean} | Value of property enableAutoBinding |
getEntitySet(): string
Gets current value of property
entitySet
.
The entity set name to fetch data and create the internal chart representation from. Note that this is not a dynamic UI5 property.
Returns:
{string} | Value of property entitySet |
Gets current value of property
height
.
Defines the height.
Default value is 74px
.
Returns:
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. width
and height
properties are ignored in such case.
Default value is false
.
Returns:
{boolean} | Value of property isResponsive |
getShowLabel(): boolean
Gets current value of property
showLabel
.
Determines if any label is shown or not
Default value is true
.
Returns:
{boolean} | Value of property showLabel |
ID of the element which is the current target of the association unitOfMeasure
, or null
.
Returns:
Gets current value of property
width
.
Defines the width.
Default value is 164px
.
Returns:
Sets a new value for property
chartBindingPath
.
This attribute can be used to specify the path that is used during the binding of the chart. If not specified, the entitySet attribute is used instead and also stored in this property. Calling bindElement
binds the control and sets this property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sChartBindingPath | New value for property chartBindingPath |
Returns:
Sets the associated chartDescription
.
Parameters:
{sap.m.Label} | oChartDescription | Id of an element which becomes the new target of this chartDescription association; alternatively, an element instance may be given |
Returns:
Sets the associated chartTitle
.
Parameters:
{sap.m.Label} | oChartTitle | Id of an element which becomes the new target of this chartTitle association; alternatively, an element instance may be given |
Returns:
Sets a new value for property
enableAutoBinding
.
If set to true
, this enables automatic binding of the chart using the chartBindingPath (if it exists) or entitySet property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bEnableAutoBinding | New value for property enableAutoBinding |
Returns:
Sets a new value for property
entitySet
.
The entity set name to fetch data and create the internal chart representation from. Note that this is not a dynamic UI5 property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sEntitySet | New value for property entitySet |
Returns:
Sets a new value for property
height
.
Defines the height.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 74px
.
Parameters:
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. width
and height
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 |
Returns:
Sets a new value for property
showLabel
.
Determines if any label is shown or not
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowLabel | New value for property showLabel |
Returns:
Sets the associated unitOfMeasure
.
Parameters:
{sap.m.Label} | oUnitOfMeasure | Id of an element which becomes the new target of this unitOfMeasure association; alternatively, an element instance may be given |
Returns:
Sets a new value for property
width
.
Defines the width.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 164px
.
Parameters:
Returns: