cancel
Showing results for 
Search instead for 
Did you mean: 

How can I Change My Dimension & Measures in chart depends on selecting X & Y axis in combo box

former_member187227
Participant
0 Kudos

Hii Experts ,

I currently working in Dashboard Charts . My Question is , How i control or change my Dimension & Measures in chart depends on selecting X & Y axis in combo box.

For Example When i select any field in x-axis , the portion of x-axis must be change to what field could i select , this is similar to Y-Axis . I want to change my bar chart x & y axis by using combo box. Please Suggest me Any code Sample or Idea .

Thanks in Advance ,

Accepted Solutions (0)

Answers (1)

Answers (1)

srinivas_sistu
Active Contributor
0 Kudos

Hi,

what you are trying to do is Filter the values of your graph based on the Value selected in the Drop down?

If so,

1. first get the model associated with the VizFrame and then do a Filter on the data....

something like this...

//Create a Filter

var aFilters = [];

var oFilter = new sap.ui.model.Filter(“<Column for filter>”,“<Operator>”, “<Filter Value>“);

aFilters.push(oFilter);

var oVizFrame = sap.ui.getCore().byId(vizFrameId);

var oBindingData = oVizFrame.getDataset().getBinding("data");

oBindingData.applyFilter();

Hope this helps

former_member196805
Contributor
0 Kudos

If dataset definition remains the same (like Dimension and Measures have no change), you could just update the model of vizFrame by calling oVizFrame.setModel(newDataset) after applied the filter.