Hi Friends,
I am getting this error when i load data to viz-Container through an ajax call. I mean I am fetching data from my sql database through an
ajax call. am I am able to draw the chart still it shows this errot "InvalidStateError: An attempt was made to use an object that is not, or is no longer,
usable"
BOTH FIREFOX AND CHROME SHOWS DEFERENT ERROR :
IN FIRE FOX : =
IN CROME : =
MY ajax call code : =
$.ajax({
type:"post",
dataType:"json",
async:false,
url:"http://localhost:8080/U_Plan/GetCompanyOverview",
success:function(data)
{
/*var oModel = new sap.ui.model.json.JSONModel();*/
oModel.setData(data);
console.log(data);
var oDataset = new sap.viz.ui5.data.FlattenedDataset({
'dimensions' : [ {
'name' : 'Skills',
'value' : "{skill}"
} ],
'measures' : [
{
'name' : 'Employees',
'value' : '{count}'
} ],
'data' : {
'path' : "/Details"
}
});
/*oVizFrame = that.getView().byId("idoVizFrame1");*/
oVizFrame.setDataset(oDataset);
oVizFrame.setModel(oModel);
// set feeds
var feedPrimaryValues = new sap.viz.ui5.controls.common.feeds.FeedItem(
{
'uid' : "primaryValues",
'type' : "Measure",
'values' : [ "Employees" ]
}), feedAxisLabels = new sap.viz.ui5.controls.common.feeds.FeedItem(
{
'uid' : "axisLabels",
'type' : "Dimension",
'values' : [ "Skills" ]
});
oVizFrame.addFeed(feedPrimaryValues);
oVizFrame.addFeed(feedAxisLabels)
oVizFrame.setVizType('column');
oVizFrame.setVizProperties({
title : {
visible : true,
text : "Employee vs Skills",
},
dataLabel:{
visible :true,
},
});
var chartPopover = new sap.viz.ui5.controls.Popover({});
chartPopover.connect(oVizFrame.getVizUid());
return;
},
error: function(data)
{
alert('fail.');
}
});
plzz help..
Thanks in advance....