Hi All,
I am using the sample odata service and trying to display the products per category in Do nut Chart.
I'm getting the below error message ..
Uncaught [50005] - pieSectorColor : does not meet minimum or maximum number of feeds definition. sap-viz.js:2d sap-viz.js:2p.checkValid sap-viz.js:2p.init sap-viz.js:2(anonymous function) sap-viz.js:2V.extend._vc_createAdapter sap-viz.js:2V.extend.appDidFinishLaunching sap-viz.js:2(anonymous function) sap-viz.js:2Setup.I.loadImages sap-viz.js:2Setup.O.extend.constructor sap-viz.js:2C sap-viz.js:2Setup.r.createViz sap-viz.js:2sap.viz.ui5.core.BaseChart._renderChart BaseChart.js:11sap.viz.ui5.core.BaseChart.onAfterRendering BaseChart.js:15sap.ui.core.Element._callEventHandles sap-ui-core.js:117sap.ui.core.Element._handleEvent sap-ui-core.js:117f sap-ui-core.js:117sap.ui.core.RenderManager.flush sap-ui-core.js:117sap.ui.core.RenderManager.render sap-ui-core.js:117sap.ui.core.UIArea.rerenderControl sap-ui-core.js:117sap.ui.core.Control.rerender sap-ui-core.js:117sap.ui.core.UIArea.rerender sap-ui-core.js:117sap.ui.core.Core._rerenderAllUIAreas sap-ui-core.js:141(anonymous function)
I think I am unable to set the path parameter in the dataset ..here is my code snippet..
what path variable I need to set here...
var url = "http://services.odata.org/v2/OData/OData.svc" ;
var oModel = new sap.ui.model.odata.ODataModel(url, true);
var dataset = new sap.viz.core.FlattenedDataset({
dimension : [{
axis : 1,
name : 'products',
value : "{Categories}"
}],
measures : [{
name : 'category',
value : {path : 'Products'}
}],
data : {path : "/Categories"}
});
var donut = new sap.viz.ui5.Donut({
width : "auto",
height : "400px",
plotArea : {'colorPalette' : d3.scale.category20().range },
title : {visible : false , text : "Products By Category"},
dataset : dataset,
});
Thanks
Rajesh