PDA

View Full Version : Manually setting Chart axis title.



neurodon
11 Jun 2012, 2:17 PM
I'm running 4.0 and trying to update a charts axis title programmaticly. If i set the .title attribute of an X or Y axis in initComponent, the property change does not stick.

F.Y.I: I'm creating an abstraction of the chart xtype and creating two custom properties: 'titlex' and 'titley'.





initComponent: function() {
var me = this;
me.callParent(arguments);
var chart = me.items.items[0].items.items[0].items.items[0];
chart.axes.items[0].title = me.titlex;
chart.axes.items[1].title = me.titley;
}


Please help!

neurodon
11 Jun 2012, 2:39 PM
Figured it out.

If you set the title in beforeComponentLayout() it will work fine.