You can define custom actions for a chart by configuring the annotation and manifest.json file in SAP Fiori elements for OData V2.
Use the onBeforeRebindChartExtension chart support controller extension to define application-specific actions. This allows you to bind additional parameters, such as custom filters or chart queries.
In the manifest.json file, define the sap.ui.controllerExtensions and extend the ALP controller sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage as shown in the following sample code:
"sap.ui5": {
...
"extends": {
"extensions": {
"sap.ui.controllerExtensions": {
"sap.suite.ui.generic.template.AnalyticalListPage.view.AnalyticalListPage": {
"controllerName": "sap.poc.ftu.apps.alr.ext.controller.AnalyticalListPageExt",
"sap.ui.generic.app": {
// …
// …
}
}
}
}
}
}
Define the extended behavior in the extension method. This enables ALP to pass the event object for extracting controls and other details.
sap.ui.define([], function() {
return {
onBeforeRebindChartExtension: function(oEvent) {
alert('onBeforeRebindChartExtension called!');
}
}
})
Related Information