Class sap.ui.comp.smartmicrochart.SmartMicroChartModule: sap/ui/comp/smartmicrochart/SmartMicroChart

extends Control

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.
Constructor Summary
new sap.ui.comp.smartmicrochart.SmartMicroChart(sId?, mSettings?)Constructor for a new sap.ui.comp.smartmicrochart/SmartMicroChart.
Event Summary
initialize(oControlEvent)Event fired once the control has been initialized.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.comp.smartmicrochart.SmartMicroChart.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.smartmicrochart.SmartMicroChart with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.smartmicrochart.SmartMicroChart.getMetadata()Returns a metadata object for class sap.ui.comp.smartmicrochart.SmartMicroChart.
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.
getChartBindingPath()Gets current value of property chartBindingPath.
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.
getChartType()Gets current value of property chartType.
getEnableAutoBinding()Gets current value of property enableAutoBinding.
getEntitySet()Gets current value of property entitySet.
getHeight()Gets current value of property height.
getIsResponsive()Gets current value of property isResponsive.
getShowLabel()Gets current value of property showLabel.
getUnitOfMeasure()ID of the element which is the current target of the association unitOfMeasure, or null.
getWidth()Gets current value of property width.
setChartBindingPath(sChartBindingPath)Sets a new value for property chartBindingPath.
setChartDescription(oChartDescription)Sets the associated chartDescription.
setChartTitle(oChartTitle)Sets the associated chartTitle.
setEnableAutoBinding(bEnableAutoBinding)Sets a new value for property enableAutoBinding.
setEntitySet(sEntitySet)Sets a new value for property entitySet.
setHeight(sHeight)Sets a new value for property height.
setIsResponsive(bIsResponsive)Sets a new value for property isResponsive.
setShowLabel(bShowLabel)Sets a new value for property showLabel.
setUnitOfMeasure(oUnitOfMeasure)Sets the associated unitOfMeasure.
setWidth(sWidth)Sets a new value for property width.
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:

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:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
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
sap.ui.comp.smartmicrochart.SmartMicroChart.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.smartmicrochart.SmartMicroChart.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachInitialize(oData?, fnFunction, oListener?): sap.ui.comp.smartmicrochart.SmartMicroChart
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
detachInitialize(fnFunction, oListener): sap.ui.comp.smartmicrochart.SmartMicroChart
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
fireInitialize(mArguments?): sap.ui.comp.smartmicrochart.SmartMicroChart
Fires event initialize to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
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
getChartDescription(): sap.m.Label
ID of the element which is the current target of the association chartDescription, or null.
Returns:
{sap.m.Label}
getChartTitle(): sap.m.Label
ID of the element which is the current target of the association chartTitle, or null.
Returns:
{sap.m.Label}
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
getHeight(): sap.ui.core.CSSSize
Gets current value of property height.

Defines the height.

Default value is 74px.

Returns:
{sap.ui.core.CSSSize} Value of property height
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
getUnitOfMeasure(): sap.m.Label
ID of the element which is the current target of the association unitOfMeasure, or null.
Returns:
{sap.m.Label}
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Defines the width.

Default value is 164px.

Returns:
{sap.ui.core.CSSSize} Value of property width
setChartBindingPath(sChartBindingPath): sap.ui.comp.smartmicrochart.SmartMicroChart
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
setChartDescription(oChartDescription): sap.ui.comp.smartmicrochart.SmartMicroChart
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
setChartTitle(oChartTitle): sap.ui.comp.smartmicrochart.SmartMicroChart
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
setEnableAutoBinding(bEnableAutoBinding): sap.ui.comp.smartmicrochart.SmartMicroChart
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
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:
{sap.ui.core.CSSSize}sHeight New value for property height
Returns:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
setIsResponsive(bIsResponsive): sap.ui.comp.smartmicrochart.SmartMicroChart
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
setUnitOfMeasure(oUnitOfMeasure): sap.ui.comp.smartmicrochart.SmartMicroChart
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:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining
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:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.ui.comp.smartmicrochart.SmartMicroChart} Reference to this in order to allow method chaining