Skip to Content
0
Former Member
Jan 24, 2014 at 02:40 PM

Move the legend Position

418 Views

Hi,

Has anybody worked on moving the legend position in charts?

I have tried many options to play with sap.viz.ui5.types.legend.Common_position but the default position(which is set to right) isnt actually changing.

I am trying the legend on a combination chart. Here is the exact code.

<code>

var oChart1 = new sap.viz.ui5.Combination({

width : "22em",

height : "21em",

plotArea : {

'colorPalette' : d3.scale.category20().range(),

'dataShape' :{primaryAxis: ['bar','bar','line']}

},

'legend':{position:left},

/* title : {

visible : true,

text : 'LyAverage and CYYID By CBDIO'

}, */

dataset : oDataset1

});

oChart1.setModel(oModel);

</code>

I am not sure hot to use "legendGroup.layout.position" as referenced in JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.viz.ui5.types.legend.Common

Please advise.

Thanks,

Atul