sap.ui.comp.smartchart.SmartChart.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.smartchart.SmartChart with name
sClassName
and enriches it with the information contained in
oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.m.VBox.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.smartchart.SmartChart.
Returns:
applyVariant(oVariantJSON, sContext)
Interface function for SmartVariantManagement control that applies the current variant.
Parameters:
{Object} | oVariantJSON | The variant JSON |
{string} | sContext | Describes the context in which the variant has been applied |
Attaches event handler
fnFunction
to the
afterVariantApply
event of this
sap.ui.comp.smartchart.SmartChart
.
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.smartchart.SmartChart
itself.
This event is fired after a variant has been applied.
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.smartchart.SmartChart itself |
Returns:
Attaches event handler
fnFunction
to the
afterVariantInitialise
event of this
sap.ui.comp.smartchart.SmartChart
.
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.smartchart.SmartChart
itself.
This event is fired after the variant management in the SmartChart 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.smartchart.SmartChart itself |
Returns:
Attaches event handler
fnFunction
to the
afterVariantSave
event of this
sap.ui.comp.smartchart.SmartChart
.
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.smartchart.SmartChart
itself.
This event is fired after a variant has been saved. This event can be used to retrieve the ID of the saved variant.
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.smartchart.SmartChart itself |
Returns:
Attaches event handler
fnFunction
to the
beforeRebindChart
event of this
sap.ui.comp.smartchart.SmartChart
.
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.smartchart.SmartChart
itself.
This event is fired right before the binding is done.
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.smartchart.SmartChart itself |
Returns:
Attaches event handler
fnFunction
to the
dataReceived
event of this
sap.ui.comp.smartchart.SmartChart
.
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.smartchart.SmartChart
itself.
This event is fired when data is received after binding. This event is fired if the binding for the chart is done by the SmartChart control itself.
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.smartchart.SmartChart itself |
Returns:
Attaches event handler
fnFunction
to the
initialise
event of this
sap.ui.comp.smartchart.SmartChart
.
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.smartchart.SmartChart
itself.
This event is 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.smartchart.SmartChart itself |
Returns:
Attaches event handler
fnFunction
to the
showOverlay
event of this
sap.ui.comp.smartchart.SmartChart
.
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.smartchart.SmartChart
itself.
This event is fired right before the overlay is shown.
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.smartchart.SmartChart itself |
Returns:
Destroys the semanticObjectController in the aggregation semanticObjectController
.
- Since:
- 1.36
Returns:
Destroys the toolbar in the aggregation toolbar
.
Returns:
Detaches event handler
fnFunction
from the
afterVariantApply
event of this
sap.ui.comp.smartchart.SmartChart
.
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:
Detaches event handler
fnFunction
from the
afterVariantInitialise
event of this
sap.ui.comp.smartchart.SmartChart
.
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:
Detaches event handler
fnFunction
from the
afterVariantSave
event of this
sap.ui.comp.smartchart.SmartChart
.
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:
Detaches event handler
fnFunction
from the
beforeRebindChart
event of this
sap.ui.comp.smartchart.SmartChart
.
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:
Detaches event handler
fnFunction
from the
dataReceived
event of this
sap.ui.comp.smartchart.SmartChart
.
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:
Detaches event handler
fnFunction
from the
initialise
event of this
sap.ui.comp.smartchart.SmartChart
.
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:
Detaches event handler
fnFunction
from the
showOverlay
event of this
sap.ui.comp.smartchart.SmartChart
.
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:
exit()
Cleans up the control.
fetchVariant(): json
Interface function for the SmartVariantManagement control that returns the currently used variant data.
Returns:
{json} | The currently used variant |
Fires event afterVariantApply
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event afterVariantInitialise
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event afterVariantSave
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event beforeRebindChart
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event dataReceived
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event initialise
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event showOverlay
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getChart(): object
Returns the chart object used internally.
Returns:
getChartBindingPath(): string
Gets current value of property
chartBindingPath
.
Specifies the path that is used during the binding of the chart. If not specified, the entitySet property is used instead. (used only if binding is established internally/automatically - See enableAutoBinding)
Returns:
{string} | Value of property chartBindingPath |
getChartType(): string
Gets current value of property
chartType
.
Specifies the type of chart to be created by the SmartChart control.
Returns:
{string} | Value of property chartType |
getCurrentVariantId(): string
Returns the ID of the currently selected variant.
Returns:
{string} | ID of the currently selected variant |
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. This happens right after the initialise
event has been fired.
Default value is false
.
Returns:
{boolean} | Value of property enableAutoBinding |
getEntitySet(): string
Gets current value of property
entitySet
.
The entity set name from which to fetch data and generate the columns.
Note This is not a dynamic property.
Returns:
{string} | Value of property entitySet |
getHeader(): string
Gets current value of property
header
.
Specifies header text that is shown in the chart.
Returns:
{string} | Value of property header |
getIgnoredChartTypes(): string
Gets current value of property
ignoredChartTypes
.
CSV of fields that is not shown in the list of available chart types.
Note: No validation is done. Please ensure that you do not add spaces or special characters.
Returns:
{string} | Value of property ignoredChartTypes |
getIgnoredFields(): string
Gets current value of property
ignoredFields
.
CSV of fields that must be ignored in the OData metadata by the SmartChart control.
Note: No validation is done. Please ensure that you do not add spaces or special characters.
Returns:
{string} | Value of property ignoredFields |
getIgnoreFromPersonalisation(): string
Gets current value of property
ignoreFromPersonalisation
.
CSV of fields that is not shown in the personalization dialog.
Note: No validation is done. Please ensure that you do not add spaces or special characters.
Returns:
{string} | Value of property ignoreFromPersonalisation |
getLegendVisible(): boolean
Gets current value of property
legendVisible
.
Set chart's legend properties.
Default value is true
.
- Since:
- 1.36
Returns:
{boolean} | Value of property legendVisible |
getPersistencyKey(): string
Gets current value of property
persistencyKey
.
Key used to access personalization data.
Returns:
{string} | Value of property persistencyKey |
getRequestAtLeastFields(): string
Gets current value of property
requestAtLeastFields
.
CSV of fields that must be always requested by the backend system.
This property is mainly meant to be used if there is no PresentationVariant annotation.
If both this property and the PresentationVariant annotation exist, the select request sent to the backend would be a combination of both.
Note: No validation is done. Please ensure that you do not add spaces or special characters.
Returns:
{string} | Value of property requestAtLeastFields |
Gets content of aggregation
semanticObjectController
.
The Semantic Object Controller allows the user to specify and overwrite functionality for semantic object navigation.
- Since:
- 1.36
Returns:
getShowChartTooltip(): boolean
Gets current value of property
showChartTooltip
.
Controls the visibility of the chart tooltip. If set to true
, the chart tooltip will be shown when hovering over a data point.
Default value is true
.
- Since:
- 1.38
Returns:
{boolean} | Value of property showChartTooltip |
getShowDetailsButton(): boolean
Gets current value of property
showDetailsButton
.
Controls the visibility of the Details button. If set to true
, the datapoint tooltip will be disabled as the information of selected datapoints will be found in the details popover. This will also set the drill-down button to invisible.
Default value is false
.
- Since:
- 1.38
Returns:
{boolean} | Value of property showDetailsButton |
getShowDrillBreadcrumbs(): boolean
Gets current value of property
showDrillBreadcrumbs
.
Controls the visibility of the Breadcrumbs control for drilling up within the visible dimensions. If set to true
, the toolbar header will be replaced by the Breadcrumbs control. This will also set the drill-up button to invisible.
Default value is false
.
- Since:
- 1.38
Returns:
{boolean} | Value of property showDrillBreadcrumbs |
getShowDrillButtons(): boolean
Gets current value of property
showDrillButtons
.
Controls the visibility of the Drill Up and Drill Down buttons.
Default value is true
.
Returns:
{boolean} | Value of property showDrillButtons |
getShowFullScreenButton(): boolean
Gets current value of property
showFullScreenButton
.
Controls the visibility of the FullScreen button.
Default value is true
.
- Since:
- 1.36
Returns:
{boolean} | Value of property showFullScreenButton |
getShowLegendButton(): boolean
Gets current value of property
showLegendButton
.
Controls the visibility of the Navigation button
Default value is true
.
- Since:
- 1.36
Returns:
{boolean} | Value of property showLegendButton |
getShowSemanticNavigationButton(): boolean
Gets current value of property
showSemanticNavigationButton
.
Controls the visibility of the Navigation button
Default value is true
.
- Since:
- 1.36
Returns:
{boolean} | Value of property showSemanticNavigationButton |
getShowVariantManagement(): boolean
Gets current value of property
showVariantManagement
.
Controls the visibility of the Variant Management.
Default value is true
.
- Since:
- 1.38
Returns:
{boolean} | Value of property showVariantManagement |
getShowZoomButtons(): boolean
Gets current value of property
showZoomButtons
.
Controls the visibility of the Zoom In and Zoom Out buttons.
Default value is true
.
- Since:
- 1.36
Returns:
{boolean} | Value of property showZoomButtons |
getSmartFilterId(): string
Gets current value of property
smartFilterId
.
ID of the corresponding SmartFilter control. If specified, the SmartChart control searches for the SmartFilter control (also in the closest parent view) and attaches to the relevant events of the SmartFilter control to fetch data, show overlay etc.
Returns:
{string} | Value of property smartFilterId |
ID of the element which is the current target of the association smartVariant
, or null
.
- Since:
- 1.38
Returns:
Gets content of aggregation
toolbar
.
A toolbar that can be added by the user to define their own custom buttons, icons, etc. If this is specified, the SmartChart control does not create an additional toolbar, but uses this one.
Returns:
getUseChartPersonalisation(): boolean
Gets current value of property
useChartPersonalisation
.
If set to true
, personalized chart settings are defined. If you want to persist the chart personalization, you need to specify the persistencyKey property.
Default value is true
.
Returns:
{boolean} | Value of property useChartPersonalisation |
getUseListForChartTypeSelection(): boolean
Gets current value of property
useListForChartTypeSelection
.
Controls the visualization for chart type selection. If set to true
, the list of available chart types will be displayed. If set to false
and there are three or fewer available chart types, the chart types will be displayed as separate buttons in the toolbar. If there are more than three chart types, a list will be shown.
Default value is true
.
- Since:
- 1.38
Returns:
{boolean} | Value of property useListForChartTypeSelection |
getUseTooltip(): boolean
Gets current value of property
useTooltip
.
Controls the usage either of the tooltip or the popover. If set to true
, a tooltip will be displayed.
Default value is true
.
- Since:
- 1.36
Returns:
{boolean} | Value of property useTooltip |
getUseVariantManagement(): boolean
Gets current value of property
useVariantManagement
.
If set to true
, variants are used. As a prerequisite, you need to specify the persistencyKey property.
Default value is true
.
Returns:
{boolean} | Value of property useVariantManagement |
rebindChart()
This can be used to trigger binding on the chart used in the SmartChart
Sets a new value for property
chartBindingPath
.
Specifies the path that is used during the binding of the chart. If not specified, the entitySet property is used instead. (used only if binding is established internally/automatically - See enableAutoBinding)
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 a new value for property
chartType
.
Specifies the type of chart to be created by the SmartChart control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sChartType | New value for property chartType |
Returns:
setCurrentVariantId(sVariantId)
Applies the current variant based on the sVariantId parameter. If an empty string or null or undefined have been passed, the standard variant will be used. The standard variant will also be used if the passed sVariantId cannot be found. If the flexibility variant, the content for the standard variant, or the personalizable control cannot be obtained, no changes will be made.
Parameters:
{string} | sVariantId | ID of the currently selected variant |
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. This happens right after the initialise
event has been fired.
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:
setEntitySet(sEntitySetName)
The entity set name in the OData metadata against which the chart must be bound.
Parameters:
{string} | sEntitySetName | The entity set |
Sets a new value for property
header
.
Specifies header text that is shown in the chart.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sHeader | New value for property header |
Returns:
Sets a new value for property
ignoredChartTypes
.
CSV of fields that is not shown in the list of available chart types.
Note: No validation is done. Please ensure that you do not add spaces or special characters.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sIgnoredChartTypes | New value for property ignoredChartTypes |
Returns:
Sets a new value for property
ignoredFields
.
CSV of fields that must be ignored in the OData metadata by the SmartChart control.
Note: No validation is done. Please ensure that you do not add spaces or special characters.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sIgnoredFields | New value for property ignoredFields |
Returns:
Sets a new value for property
ignoreFromPersonalisation
.
CSV of fields that is not shown in the personalization dialog.
Note: No validation is done. Please ensure that you do not add spaces or special characters.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sIgnoreFromPersonalisation | New value for property ignoreFromPersonalisation |
Returns:
Sets a new value for property
persistencyKey
.
Key used to access personalization data.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sPersistencyKey | New value for property persistencyKey |
Returns:
Sets a new value for property
requestAtLeastFields
.
CSV of fields that must be always requested by the backend system.
This property is mainly meant to be used if there is no PresentationVariant annotation.
If both this property and the PresentationVariant annotation exist, the select request sent to the backend would be a combination of both.
Note: No validation is done. Please ensure that you do not add spaces or special characters.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sRequestAtLeastFields | New value for property requestAtLeastFields |
Returns:
Sets a new value for property
selectionMode
.
Chart selection mode. Supported values are sap.chart.SelectionMode.Single or sap.chart.SelectionMode.Multi, case insensitive, always return in upper case. Unsupported values will be ignored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Multi
.
Parameters:
- Since:
- 1.36
Returns:
Sets the aggregated semanticObjectController
.
Parameters:
- Since:
- 1.36
Returns:
Sets a new value for property
showChartTooltip
.
Controls the visibility of the chart tooltip. If set to true
, the chart tooltip will be shown when hovering over a data point.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowChartTooltip | New value for property showChartTooltip |
- Since:
- 1.38
Returns:
Sets a new value for property
showDetailsButton
.
Controls the visibility of the Details button. If set to true
, the datapoint tooltip will be disabled as the information of selected datapoints will be found in the details popover. This will also set the drill-down button to invisible.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShowDetailsButton | New value for property showDetailsButton |
- Since:
- 1.38
Returns:
Sets a new value for property
showDrillBreadcrumbs
.
Controls the visibility of the Breadcrumbs control for drilling up within the visible dimensions. If set to true
, the toolbar header will be replaced by the Breadcrumbs control. This will also set the drill-up button to invisible.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShowDrillBreadcrumbs | New value for property showDrillBreadcrumbs |
- Since:
- 1.38
Returns:
Sets a new value for property
showFullScreenButton
.
Controls the visibility of the FullScreen button.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowFullScreenButton | New value for property showFullScreenButton |
- Since:
- 1.36
Returns:
Sets a new value for property
showVariantManagement
.
Controls the visibility of the Variant Management.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowVariantManagement | New value for property showVariantManagement |
- Since:
- 1.38
Returns:
Sets a new value for property
smartFilterId
.
ID of the corresponding SmartFilter control. If specified, the SmartChart control searches for the SmartFilter control (also in the closest parent view) and attaches to the relevant events of the SmartFilter control to fetch data, show overlay etc.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sSmartFilterId | New value for property smartFilterId |
Returns:
Sets the associated smartVariant
.
Parameters:
{sap.ui.core.Control} | oSmartVariant | Id of an element which becomes the new target of this smartVariant association; alternatively, an element instance may be given |
- Since:
- 1.38
Returns:
Sets the aggregated toolbar
.
Parameters:
Returns:
Sets a new value for property
useChartPersonalisation
.
If set to true
, personalized chart settings are defined. If you want to persist the chart personalization, you need to specify the persistencyKey property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bUseChartPersonalisation | New value for property useChartPersonalisation |
Returns:
Sets a new value for property
useListForChartTypeSelection
.
Controls the visualization for chart type selection. If set to true
, the list of available chart types will be displayed. If set to false
and there are three or fewer available chart types, the chart types will be displayed as separate buttons in the toolbar. If there are more than three chart types, a list will be shown.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bUseListForChartTypeSelection | New value for property useListForChartTypeSelection |
- Since:
- 1.38
Returns:
Sets a new value for property
useTooltip
.
Controls the usage either of the tooltip or the popover. If set to true
, a tooltip will be displayed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bUseTooltip | New value for property useTooltip |
- Since:
- 1.36
Returns:
Sets a new value for property
useVariantManagement
.
If set to true
, variants are used. As a prerequisite, you need to specify the persistencyKey property.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bUseVariantManagement | New value for property useVariantManagement |
Returns: