Skip to Content
0
Former Member
Jun 24, 2015 at 02:16 AM

Facing problems to display the data in bar chart

814 Views

Dear Experts,

I am facing problems to display the data in bar chart. I have run out of idea on how to solve it. Is there anyone can share the solutions or suggestion about the ways how to display the data on bar chart in Web IDE Cloud?

Below is the code in the detail.controller.js. I am not sure whether is there any wrong to the code as shown. I have attached the output as shown in below. Kindly correct me if any part is wrong.

Very thanks and appreciated to your kindness.

Regards,

Loh


var oDataset = new sap.viz.ui5.data.FlattenedDataset({

dimensions: [{

axis: 1,

name: "Item",

value: "{Item}"

}],

measures: [{

name: "Quantity",

value: "{Quantity}"

},

{

name: "Value",

value: "{Value}"

}],

data: {

path: "/SOItems"

}

});

oVizFrame.setDataset(oDataset);

oVizFrame.setModel(oModel);

var feedValueAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({

"uid": "valueAxis",

"type": "Measure",

"values": "{Quantity,Value}"

}),

feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({

"uid": "categoryAxis",

"type": "Dimension",

"values": "{Item}"

});

oVizFrame.setVizProperties({

valueAxis: {

label: {

formatString: "u"

}

},

plotArea: {

dataLabel: {

visible: true,

formatString: "#,##0"

}

},

legend: {

title: {

visible: false

}

},

title: {

visible: true,

text: "Value by Quantity and Item"

}

});

oVizFrame.addFeed(feedValueAxis);

oVizFrame.addFeed(feedCategoryAxis);

oPopOver.connect(oVizFrame.getVizUid());

Attachments