The following code gives me a nice line chart as shown below:
//Code snippet to create dataset var oDataset1 = new sap.viz.ui5.data.FlattenedDataset({ dimensions : [{axis : 1,name :'BUSINESS_DATE', value :"BUSINESS_DATE"}] measures : [{name : 'Profit', value : '{Profit}'}],//Define the Y-axis parameter data : {path : "/GRAPHDATA",filters: [oFilter1,oFilter2,oFilter3],parameters: {select: 'BUSINESS_DATE,PROFIT'}}}); //set the data and filter
Define line chart:
var oLineChart = new sap.viz.ui5.Line({width : "100%",height : "300px", //plotArea : {'colorPalette' :['#748CB2','#FFC200']}, title : {visible : true,text : 'BusinessDate Vs Profit'}, dataset : oDataset1, selectData : function(oEvent) { alert("Need to extend code"); }, });
Now, when I click on a single data point I need to get the values of X-axis and Y-axis of that data point selected. Could anyone suggest how this could be done? Any example solutions. Thanks