View Full Version : Manually setting Chart axis title.

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;
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!

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

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