PDA

View Full Version : How to manage CategoryAxis yAxis of the stackedbarchart that are too long.



kaslakhanova
5 May 2011, 7:52 PM
My first forum hello to all of you brilliant people,

I have been looking for a way to word wrap my yAxis CategoryAxis of the stackedbarchart. The labels are very long but they need to be displayed, however currently in the 400px i see more labels than a chart.

Is there a way to control the width of the yAxis labels, or maybe control the outside container of the chart and the chart plotting area?

I also wasn't able to find any examples on this. Did anyone have to do this before?

Here is a very simple example of what i have.


var panel = new Ext.Panel({
width: 400,
height: 300,
layout: 'column',
renderTo: "chart",
items: [
{
xtype: 'stackedbarchart',
store: store,
yField: jsonObj.Details[0], //tooo long to fit
xAxis: new Ext.chart.NumericAxis({
stackingEnabled: false
}),
series: [{
xField: jsonObj.Details[1],
displayName: jsonObj.Details[1]
}, {
xField: jsonObj.Details[2],
displayName: jsonObj.Details[2]
}]
}]
});


Thanks in advance.

FemmeFatale~o)