View Full Version : Ext.Charts -> Axis-Label

8 Jun 2009, 2:16 PM
hi together,

i am trying to put together a chart having 12 entries on the x-axis.
i have a store-field called 'interval' having the strings '1' to '12'.

now i would like to show the monthnames January - Dezember instead.

first of all, what type of axis to chose?
numeric-axis brings some problems, since it wants to size automatically.
ok, you can set min and max, but i am not sure if there are always the right values in between.

i tried out something like

xAxis : new Ext.chart.Axis({ // according to the api
labelFunction : function(val){return 'test';}

xAxis : new Ext.chart.Axis({ // according to the example-source
labelRenderer: function(val){return 'test';}

both did not work.

any ideas?

kind regards, tobiu

8 Jun 2009, 3:06 PM

i guess i had a bug in my code while testing.
something like

xAxis : new Ext.chart.CategoryAxis({
labelRenderer : function(val){
var month = bT.dataStores['months'].getById(val).data.name; //custom store
return month;

is working fine.

kind regards, tobiu