Hello All,
I set a binding context to a viz-column-graph when I click on a datapoint. But now I want to implement a method where, on a button click(on UI) I need to remove the current context thats been binded to the graph.
My current code to do that:
onPress:function(){ flattened_dataset = this.getView().byId("dataset"); dataset.removeAllDimensions(); new_dimesion_prd_name = new sap.viz.ui5.data.DimensionDefinition ({name:"Product_Name", axis:1, value:"{Product_Name}"}); new_dimesion_year = new sap.viz.ui5.data.DimensionDefinition ({name:"Year", axis:1, value:"{Year}"}); new_dimesion_quarter = new sap.viz.ui5.data.DimensionDefinition ({name:"Quarter", axis:1, value:"{Quarter}"}); dataset.insertDimension(new_dimesion_prd_name,1); dataset.insertDimension(new_dimesion_year,2); dataset.insertDimension(new_dimesion_quarter,3); var graph = this.getView().byId("graph"); graph.unbindElement(); flattened_dataset.bindData('Quarter');
But the unbindElement() does not work in my case. Maybe I am missing something.
Any suggestions on How to remove the current binding context on a page or graph element etc.
Thanks in advance.
Regards
Sangamesh