Results 1 to 8 of 8

Thread: Chart Category: Labels not centered after rotation

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Switzerland
    Posts
    6

    Default Chart Category: Labels not centered after rotation

    Hi everybody

    I've a problem and I don't know what I'm doing wrong or if it is really a bug in ExtJS >= 4.0 (Currently I'm using 4.1.1, but the error also occurred in 4.0.7).

    I didn't find any thread or external page about this problem. If you did, please response with that link.

    The field in the store is a Date, so I reformat it to a readable String and rotate it. In the attached picture you will see that the text is not under the dash. What am I doing wrong or what are the points where I can look for some wrong category definitions? I'm using the standard ExtJS CSS.

    This problem occurs on IE8,9, FF and Chrome. So it's not a browser bug.

    Category definition:
    Code:
    {    type    : 'Category',
        position: 'bottom',
        title   : 'Datum',
        fields  : ['date'],
        label   : {
            rotation:{degrees:-90},
            renderer: function(v){
                var rendered = Ext.String.trim(Ext.Date.format(v,'d.m.y'));
                rendered = rendered.replace(/(\r\n|\n|\r)/gm,"").replace(/\s+/g," ");
                if (scope.logValidAndEnabled===true) {
                    console.log('Rendering date axis :',v,this, rendered);
                }
                return rendered;
            }
        }
    }
    Attached Images Attached Images

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Location
    Switzerland
    Posts
    6

    Default

    Does nobody have an idea or a hint?

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    Bangalore,IN
    Posts
    114
    Answers
    6

    Default

    May be the axis must be set to "time"..Please try that & let me know about it.

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Location
    Switzerland
    Posts
    6

    Default

    Allready testet. And the category axis uses the render function, so it should just be equal to text.

  5. #5
    Sencha User
    Join Date
    Jan 2008
    Posts
    212
    Answers
    3

    Default

    is there something new? i have the same problem.

  6. #6
    Sencha User
    Join Date
    Aug 2011
    Location
    Bangalore,IN
    Posts
    114
    Answers
    6

    Default

    Change the degree to 270.

    Quote Originally Posted by Swissbite View Post
    Allready testet. And the category axis uses the render function, so it should just be equal to text.

  7. #7
    Sencha User
    Join Date
    Mar 2013
    Posts
    2

    Default

    None of the solutions suggested here have worked for me. Any idea if there is a workaround or a fix for this?

  8. #8
    Sencha User
    Join Date
    Mar 2013
    Posts
    2

    Default

    Change rotation to rotate?.

Tags for this Thread

Posting Permissions

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