Hi All
How can I get the dimension value in VIZ bar Chart on dataselect event.
Clicked on PCV_Warning bar then I need PCV_Warning text in alert message.
I have used following code for BAR generation.
var oDataset1 = new sap.viz.ui5.data.FlattenedDataset({
dimensions : [
{
axis : 1, // must be one for the x-axis, 2 for y-axis
name : 'EventID',
value : "{EventID}"
}
],
measures : [
{
name : 'NumofInstances', // 'name' is used as label in the Legend
value : '{NumofInstances}' // 'value' defines the binding for the displayed value
}
],
data : { path : "/Rowset/Row" }
});
oChart1= new sap.viz.ui5.Bar(
{
width : "600px",
height : "350px",
plotArea : {
//'colorPalette' : d3.scale.category20().range()
},
title : {
visible : true,
text : 'Bar Chart'
},
selectData : [ function(oEvent) {
alert('hi'+oEvent.getSource());
}, this ],
dataset : oDataset1
});
Thanks in advance
Sudipto