The SmartMicroChart control creates a chart based on OData metadata and the configuration specified by mSettings
.
The entitySet
property is required. This property is used to fetch metadata and annotation information from the specified default OData model. Depending on the UI/ChartType annotation, the control creates a corresponding SmartAreaMicroChart, SmartBulletMicroChart, SmartStackedBarMicroChart, SmartLineMicroChart, or SmartRadialMicroChart instance and delegates it to the internal control.
Note: Most of the attributes are not dynamic and cannot be changed once the control has been initialized.
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#constructor for a general description of the syntax of the settings object.
new sap.ui.comp.smartmicrochart.SmartMicroChart(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
chartBindingPath | string | 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 |
|
chartType | string | Specifies the type of chart. Note that this property is read-only. Visibility: public |
|
enableAutoBinding | boolean | false | If set to |
entitySet | string | The entity set name to fetch data and create the internal chart representation from. Note that this is not a dynamic UI5 property. Visibility: public |
|
height | sap.ui.core.CSSSize | The height of the chart. Overrides the height specified in the |
|
isResponsive | boolean | false | 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 or by the width and height property. Visibility: public |
showLabel | boolean | true | Determines if any label is shown or not Visibility: public |
size | sap.m.Size | Auto | The size of the microchart. If not set, the default size is applied based on the size of the device tile. Responsive size takes width and height of the parent container where the micro chart is included. |
width | sap.ui.core.CSSSize | The width of the chart. Overrides the width specified in the |
Default Aggregation: _chart
Name | Cardinality | Type | Description |
---|---|---|---|
_chart (default) | 0..1 | sap.ui.core.Control |
This private aggregation is used for the internal instance of Smart<*>MicroChart. |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaLabelledBy | 0..n | sap.ui.core.Control |
Controls or IDs that label this control. Can be used by screen reader software. |
chartDescription | 0..1 | sap.m.Label |
If the associated control is provided, its |
chartTitle | 0..1 | sap.m.Label |
If the associated control is provided, its |
freeText | 0..1 | sap.m.Label |
If the associated control is provided, its |
unitOfMeasure | 0..1 | sap.m.Label |
If the associated control is provided, its |
Method | Description |
---|---|
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
attachInitialize |
Attaches event handler When called, the context of the event handler (its Event fired once the control has been initialized. |
detachInitialize |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.comp.smartmicrochart.SmartMicroChart.extend |
Creates a new subclass of class sap.ui.comp.smartmicrochart.SmartMicroChart with name
|
fireInitialize |
Fires event initialize to attached listeners. |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
getChartBindingPath |
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 |
getChartDescription |
ID of the element which is the current target of the association chartDescription, or |
getChartTitle |
ID of the element which is the current target of the association chartTitle, or |
getChartType |
Gets current value of property chartType. Specifies the type of chart. Note that this property is read-only. |
getEnableAutoBinding |
Gets current value of property enableAutoBinding. If set to Default value is |
getEntitySet |
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. |
getFreeText |
ID of the element which is the current target of the association freeText, or |
getHeight |
Gets current value of property height. The height of the chart. Overrides the height specified in the |
getIsResponsive |
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 or by the width and height property. Default value is |
sap.ui.comp.smartmicrochart.SmartMicroChart.getMetadata |
Returns a metadata object for class sap.ui.comp.smartmicrochart.SmartMicroChart. |
getShowLabel |
Gets current value of property showLabel. Determines if any label is shown or not Default value is |
getSize |
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. Responsive size takes width and height of the parent container where the micro chart is included. Default value is |
getUnitOfMeasure |
ID of the element which is the current target of the association unitOfMeasure, or |
getWidth |
Gets current value of property width. The width of the chart. Overrides the width specified in the |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
setChartBindingPath |
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 When called with a value of |
setChartDescription |
Sets the associated chartDescription. |
setChartTitle |
Sets the associated chartTitle. |
setEnableAutoBinding |
Sets a new value for property enableAutoBinding. If set to When called with a value of Default value is |
setEntitySet |
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 |
setFreeText |
Sets the associated freeText. |
setHeight |
Sets a new value for property height. The height of the chart. Overrides the height specified in the When called with a value of |
setIsResponsive |
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 or by the width and height property. When called with a value of Default value is |
setShowLabel |
Sets a new value for property showLabel. Determines if any label is shown or not When called with a value of Default value is |
setSize |
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. Responsive size takes width and height of the parent container where the micro chart is included. When called with a value of Default value is |
setUnitOfMeasure |
Sets the associated unitOfMeasure. |
setWidth |
Sets a new value for property width. The width of the chart. Overrides the width specified in the When called with a value of |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event initialize to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
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.
ID of the element which is the current target of the association chartDescription, or null
.
Gets current value of property chartType.
Specifies the type of chart. Note that this property is read-only.
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
.
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.
Gets current value of property height.
The height of the chart. Overrides the height specified in the size
property.
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 or by the width and height property.
Default value is false
.
Returns a metadata object for class sap.ui.comp.smartmicrochart.SmartMicroChart.
Gets current value of property showLabel.
Determines if any label is shown or not
Default value is true
.
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. Responsive size takes width and height of the parent container where the micro chart is included.
Default value is "Auto"
.
ID of the element which is the current target of the association unitOfMeasure, or null
.
Gets current value of property width.
The width of the chart. Overrides the width specified in the size
property.
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sChartBindingPath | string |
New value for property |
Sets the associated chartDescription.
Param | Type | DefaultValue | Description |
---|---|---|---|
oChartDescription | sap.ui.core.ID sap.m.Label |
ID of an element which becomes the new target of this chartDescription association; alternatively, an element instance may be given |
Sets the associated chartTitle.
Param | Type | DefaultValue | Description |
---|---|---|---|
oChartTitle | sap.ui.core.ID sap.m.Label |
ID of an element which becomes the new target of this chartTitle association; alternatively, an element instance may be given |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnableAutoBinding | boolean | false |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sEntitySet | string |
New value for property |
Sets the associated freeText.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFreeText | sap.ui.core.ID sap.m.Label |
ID of an element which becomes the new target of this freeText association; alternatively, an element instance may be given |
Sets a new value for property height.
The height of the chart. Overrides the height specified in the size
property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sHeight | sap.ui.core.CSSSize |
New value for property |
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 or by the width and height property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bIsResponsive | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowLabel | boolean | true |
New value for property |
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. Responsive size takes width and height of the parent container where the micro chart is included.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "Auto"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSize | sap.m.Size | "Auto" |
New value for property |
Sets the associated unitOfMeasure.
Param | Type | DefaultValue | Description |
---|---|---|---|
oUnitOfMeasure | sap.ui.core.ID sap.m.Label |
ID of an element which becomes the new target of this unitOfMeasure association; alternatively, an element instance may be given |
Sets a new value for property width.
The width of the chart. Overrides the width specified in the size
property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize |
New value for property |