cancel
Showing results for 
Search instead for 
Did you mean: 

Data Label on Pareto Charts in VizFrame Dual Combination.

Former Member
0 Kudos

Hi my scenario is something like this: I have to create a pareto chart. Hence it has 2 y axis and one x axis.pareto-chart.png

So I have created this: pareto.png

As you can see in the output, I have written values above the bar chart like 6,4,2,.........

I just want to achieve that.

Actually, I have maintained data for the bar chart, line chart, also for these data(6,4,2,....) Please help me to achieve this requirement.

I am sharing part of my code:

var oDataset = sap.viz.ui5.data.FlattenedDataset({
dataLabel : {
name : "Value Label",
defaultState : true
},
dimensions : [
{axis : 1, name: "Categories", value: "{Model>Disruptions}"}
],
measures : [
{name : "Time Lost", value : "{Model>Occurrences}"},
{name : "Percent", value : "{Model>Percent}"},
{name : "Value", value : "{Model>Value}"}
],
data : {
path : "Model>/data"
}
});
oParetto.setDataset(oDataset);
oParetto.setVizType('dual_stacked_combination');
//oParetto.setvizScales({});
oParetto.setVizProperties({

plotArea:{
primaryScale:{fixedRange: true, maxValue: 25, minValue: 0 },
dataLabel:{
visible:true
},
dataShape:{
primaryAxis:["bar"],
secondaryAxis:["line"]
}
},
categoryAxis: {
label: {
angle: 45
}
},
valueAxis: {},
valueAxis2: {
label:{
visible: true,
formatString: FIORI_PERCENTAGE_FORMAT_2}
},
title : {
visible : "true",
text : "Profit & Measure By Region & Company"
}
});
var feedValueAxis1 = new sap.viz.ui5.controls.common.feeds.FeedItem({
'uid': "valueAxis",
'type': "Measure",
'values': ["Time Lost"]
}),
feedValueAxis2 = new sap.viz.ui5.controls.common.feeds.FeedItem({
'uid': "valueAxis2",
'type': "Measure",
'values': ["Percent"]
}),
feedCategoryAxis = new sap.viz.ui5.controls.common.feeds.FeedItem({
'uid': "categoryAxis",
'type': "Dimension",
'values': ["Categories"]
});
oParetto.addFeed(feedValueAxis1);
oParetto.addFeed(feedValueAxis2);
oParetto.addFeed(feedCategoryAxis);

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member196805
Contributor
0 Kudos

That's by design if you use stacked_combination chart. If you don't need the bars' values to be stacked, you could try combination chart as data labels will be positioned on the top of the bar by default.