Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Ext GWT Premium Member
    Join Date
    Oct 2011
    Posts
    99
    Vote Rating
    0
    LEWJO10@ca.com is on a distinguished road

      0  

    Default (GXT 3.0.0 GA) Can’t Center TimeAxis Labels on Tick Marks in Charts

    (GXT 3.0.0 GA) Can’t Center TimeAxis Labels on Tick Marks in Charts


    Version of Ext GWT
    This problem occurs in the recently released GA version of Ext GWT 3.0.0.

    Browser versions
    Firefox 7
    Internet Explorer 8

    Operating System
    Windows 7 64 bit

    Hardware
    Dell Precision M4500
    8 CPUs – Intel Core i7
    8 GB Memory

    Virtual Machine
    No

    Description
    We have a requirement to center the TimeAxis labels on the major tick marks when the TimeAxis is used horizontally below the chart (setPosition(Position.BOTTOM)).

    However, there does not seem to be a way to do this.

    Setting text anchor to middle does not work consistently. The labels tend to be aligned left of center.

    Setting text anchor to start causes the labels to be aligned right of center.

    Setting text anchor to end causes the labels to be aligned far right of center.

    Run Mode
    Occurs in when deployed to Tomcat (web mode), and running under Eclipse (dev mode).

    Steps to Reproduce
    The attached file (ColumnChartTimeAxisLabelsIssue.txt) can be used to demonstrate the problem. It is using TextAnchor.Middle.

    The chart first comes up showing a range of time from December 1, 2012 through December 15, 2013.

    At this point about all of the labels are aligned correctly (middle) except the first label (12/1). Pease see attached AnchorMiddleFF1.png (Firefox).

    But, the alignment problem gets much worse as things change.

    If the browser is resized horizontally, then all of the labels are aligned too far left of center. Pease see attached AnchorMiddleFF2.png (Firefox).

    If the date range is increased using the Start Date and End Date fields, all of the labels are aligned too far left of center. Pease see attached AnchorMiddleFF3.png (Firefox).

    Same problem with IE. Please see AnchorMiddleIE.png (Internet Explorer).

    By changing the text alignment to start or end in the attached file (ColumnChartTimeAxisLabelsIssue.txt), you will see that those options do not help remedy the problem.

    Please let me know if I am doing anything wrong in the code in the attached file or if there is a work around.

    Thanks,
    John L
    Attached Images
    Attached Files

  2. #2
    Sencha - GXT Dev Team BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Vote Rating
    3
    BrendanC is on a distinguished road

      0  

    Default


    Thanks for the report. I'll let you know when it is fixed.

  3. #3
    Sencha - GXT Dev Team BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Vote Rating
    3
    BrendanC is on a distinguished road

      0  

    Default


    I have added support on cartesian axis for the TextAnchor attribute on horizontal labels and the TextBaseline attribute on vertical labels. This appears much more accurate for centering. TextAnchor.jpg

  4. #4
    Ext GWT Premium Member
    Join Date
    Oct 2011
    Posts
    99
    Vote Rating
    0
    LEWJO10@ca.com is on a distinguished road

      0  

    Default


    Brendan,

    Thanks for fixing this.

    John L.

  5. #5
    Sencha - GXT Dev Team BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Vote Rating
    3
    BrendanC is on a distinguished road

      0  

    Default


    GXT 3.0.1 has been released and contains this fix.

Thread Participants: 1