1. #1
    Ext User
    Join Date
    Mar 2010
    Posts
    2
    Vote Rating
    0
    carolinfox is on a distinguished road

      0  

    Exclamation why isn't the xAxis property 'labelSpacing' effective?

    why isn't the xAxis property 'labelSpacing' effective?


    My code is like below:
    ======================No.1 js file (add 2 lines in the extjs 3.2.1 example code)================
    // extra extra simple
    new Ext.Panel({
    title: 'ExtJS.com Visits Trend, 2007/2008 (No styling)',
    renderTo: 'container',
    width:1000,
    height:300,
    layout:'fit',

    items: {
    xtype: 'linechart',
    store: store,
    xField: 'name',
    yField: 'visits',
    xAxis: new Ext.chart.CategoryAxis({
    title: 'test XAxis',
    labelSpacing: 20 // I add it, and nothing happened.why?
    }),
    yAxis: new Ext.chart.NumericAxis({
    title: 'test YAxis',
    labelSpacing: 20 // I add it, and nothing happened.why?
    }),
    listeners: {
    itemclick: function(o){
    var rec = store.getAt(o.index);
    Ext.example.msg('Item Selected', 'You chose {0}.', rec.get('name'));
    }
    }
    }
    });
    ===================No.2 js file=====================================
    Another js file:

    chartStyle: {
    padding: 10,
    animationEnabled: true,
    font: {
    name: 'Tahoma',
    color: 0x444444,
    size: 11
    },
    dataTip: {
    padding: 5,
    border: {
    color: 0x99bbe8,
    size:1
    },
    background: {
    color: 0xDAE7F6,
    alpha: .9
    },
    font: {
    name: 'Tahoma',
    color: 0x15428B,
    size: 10,
    bold: true
    }
    },
    xAxis: {
    color: 0x69aBc8,
    labelSpacing : 200, // I add it, and nothing happened.why?
    majorTicks: {color: 0x69aBc8, length: 4},
    minorTicks: {color: 0x69aBc8, length: 2},
    majorGridLines: {size: 1, color: 0xeeeeee}

    },
    yAxis: {
    color: 0x69aBc8,
    majorTicks: {color: 0x69aBc8, length: 4},
    minorTicks: {color: 0x69aBc8, length: 2},
    majorGridLines: {size: 1, color: 0xdfe8f6}
    }
    },
    ================================================================================
    If you can tell me, thank you very much!

  2. #2
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,546
    Vote Rating
    64
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    Starting the same thread 3 times makes people less likely to answer you.

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    The first file is obviously incorrect. labelSpacing is a config option of the xAxis and yAxis chartStyle.

    Your second file looks ok, but it doesn't contain the entire chart config, so I don't know the rest is ok.

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    12
    Vote Rating
    0
    designated is on a distinguished road

      0  

    Default


    I cannot seem to get labelSpacing to do anything either. Has anyone ever had this working?

    Thanks

Similar Threads

  1. Replies: 1
    Last Post: 21 May 2010, 9:46 AM
  2. Don't display Xaxis label
    By falto in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 19 Oct 2009, 8:03 AM
  3. xAxis with decimal values
    By silve69 in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 26 Aug 2009, 12:30 PM
  4. [CLOSED][3.??] Issue with xAxis and TimeAxis
    By cfrerebeau in forum Ext 3.x: Bugs
    Replies: 3
    Last Post: 23 Jun 2009, 10:59 AM

Thread Participants: 3

Tags for this Thread