Hi All,
I am getting a [50017] error while mapping my pie chart to my oData service.
Dont know what is the error. Have tried many a things, however nothing seems to work.
Dummy data is as well not working since i have the pie chart in a carousel that also consumes a oData.
I have column charts as well which are working but pie charts fail with the same approach.
My services are working fine in the browser.
xml-------------->
<m:Carousel loop="true" pages="{/d/results}" id="idCarousel" pageChanged="carouselchange" >
<m:Panel>
<viz:VizFrame id="idpiechart" vizType="pie"/></m:Panel>
</m:Carousel>
.js file:
var oVizFramepie = this.getView().byId("idpiechart");
jQuery.ajax({
dataType:"json",
crossDomain:true,
success:function(oData){
var oModel = new sap.ui.model.json.JSONModel();
oModel.setData(oData);
var oDataset = new sap.viz.ui5.data.FlattenedDataset({
dimensions: [{
name: "Nominee",
value: "{NomiToName}"
}],
measures: [{
name: 'Votes',
value: '{NomCount}'
}],
data: {
path: "/d/results"
}
});
oVizFramepie.setDataset(oDataset);
oVizFramepie.setModel(oModel);
var feedSize = new sap.viz.ui5.controls.common.feeds.FeedItem({
'uid': "size",
'type': "Measure",
'values': ["Votes"]
}),
feedColor = new sap.viz.ui5.controls.common.feeds.FeedItem({
'uid': "color",
'type': "Dimension",
'values': ["Nominee"]
});
oVizFramepie.setVizProperties({
legend: {
title: {
visible: false
}
},
title: {
visible: true,
text: 'Revenue by Item Category'
}
});
oVizFramepie.addFeed(feedSize);
oVizFramepie.addFeed(feedColor);
}
});