Hello Karen,
You can try as below. Here I have passed filters to the OData Call and copied the resultant data to the JSON Model and then bound to chart.
oModel.read("/<EntitySet/Collection>",{filters:ofilters,success:function(oData,oResponse){
var oJsonModel = new sap.ui.model.json.JSONModel();
oJsonModel.setData({modelData : oData.results});
// Dual Chart Binding
var oDualComb = this_root.getView().byId("<Chart_id>");
// Combination Graph dataset
var oDataset = new sap.viz.ui5.data.FlattenedDataset({
dimensions: [{
axis:1,
name: "<Name of first Dimension>",
value: {
path : '<DimensionField1>',
}
},
{
axis:2,
name: " ",
value: " "
}],
measures: [
{
group :1,
name: '',
value: '{<MeasureField1>}'
}, {
group:2,
name: '',
value: '{<MeasureField2}'
}, {
group:2,
name: '',
value: '{<MeasureField3}'
}
]
});
oDataset.setModel(oJsonModel);
oDataset.bindData("/modelData",null,null,null);
oDualComb.setDataset(oDataset);
oDataset.getMeasures()[0].setName("<Measure1 text>");
oDataset.getMeasures()[1].setName("<Measure2 text>");
oDataset.getMeasures()[2].setName("<Measure3 text>");
oDualComb.getXAxis().getTitle().setText("<Dimension1 text>");
oDualComb.getXAxis().getTitle().setVisible(true);
oDualComb.getLegendGroup().getLayout().setPosition("bottom");
oDualComb.getYAxis().getTitle().setText("");
oDualComb.getYAxis().getTitle().setVisible(true);
oDualComb.getYAxis2().getTitle().setText("");
oDualComb.getYAxis2().getTitle().setVisible(true);
oDualComb.getXAxis().setMaxSizeRatio(1);
BR.