In my XML view I have used Smartcharts with CDs views entityset and it was working as per the requirement.
Output
As per the new requirement, need to enable the parameters to the CDs views to reduce the amount of load for the given entityset.
I have tried Smartchart beforeRebindChart
event for applying the missing parameters.
smartChartBeforeRebind: function (oEvent) {
var oBindingParams = oEvent.getParameter("bindingParams");
oBindingParams.parameters = { "entitySet": "Z****_SERV1" };
var aFilters = [];
aFilters.push(new sap.ui.model.Filter("***den", sap.ui.model.FilterOperator.EQ, "ALL"));
oBindingParams.filters = aFilters;
oBindingParams.events.dataRequested = (oEvent) => {
console.log("oBindingParams.events.dataRequested: ", oEvent);
}
oBindingParams.events.dataRecevied = (oEvent) => {
console.log("oBindingParams.events.dataRecevied: ", oEvent);
}
},
After applying the filters to the entityset the Smartcharts are not loading. An empty tile is loaded without chart. Is there any way I can apply filters/parameters to the Smartchart?
I am using oData V2 version and project is created using SAP BAS.
question from:
https://stackoverflow.com/questions/66060124/sapui5-smartchart-binding-using-cds-views-with-parameters 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…