PDA

View Full Version : how to rotate axis in stackedbarchart in extjs 3.4



@naresh
29 Jul 2013, 5:12 AM
hi every body ,
i am using extjs 3.4 stackedbarchart and i want to horizontal stackedbarchart ,i am confuse how to set the property here is my code :

{
store: weeklyInstalationGraph(),
xtype: 'stackedbarchart',
id:'stackedbarchartId',
yField: 'parseWeek',
xAxis: new Ext.chart.NumericAxis({
stackingEnabled: true,
rotation: 90 ,
labelRenderer: roundchart()
}),
series: [{
xField: 'Android',

displayName: 'Android'
},{
xField: 'Java',
displayName: 'JAVA'
},{
xField: 'J2ME',
displayName: 'J2ME'
},{
xField: 'javascript',
displayName: 'Java Script'
}],
extraStyle: {
xAxis: {
labelRotation: 90 //-90 through 90
},
yAxis: {
labelRotation: 90 //-90 through 90
}
},

slemmon
31 Jul 2013, 8:04 AM
I'm not seeing rotation as a config option for NumericAxis. Is orientation what you're looking for perhaps?
http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.chart.NumericAxis-property-orientation

@naresh
31 Jul 2013, 9:51 AM
thanks for reply ,
but i am use the orientation but my graph has no changes here is the image of my graph i want it vertical.45143

slemmon
31 Jul 2013, 1:30 PM
Looks like you're looking for the extraStyle config on the chart:
http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.chart.Chart-cfg-extraStyle

See the source on this example (this one uses xAxis, but about gets you there):
http://dev.sencha.com/deploy/ext-3.4.0/examples/chart/reload-chart.html