Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

selectData SAPUI5 viz

$
0
0

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");                                           },  });

chart_click.PNG

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


Viewing all articles
Browse latest Browse all 6412

Trending Articles