Results 1 to 2 of 2

Thread: Ext.Charts -> Axis-Label

  1. #1
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,751

    Default Ext.Charts -> Axis-Label

    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

    Code:
    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

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,751

    Default

    hmm,

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

    Code:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •