1. #1
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    82
    Vote Rating
    0
    Syed Huda is on a distinguished road

      0  

    Exclamation Unanswered: Extjs 4.0 Bar Chart, how to configure the size of the text items in the Category Axis

    Unanswered: Extjs 4.0 Bar Chart, how to configure the size of the text items in the Category Axis


    I'm using EXT 4 and using Architect tool. I created a panel with Bar chart, and I attached to a store.
    The Category axis has text that I want to be wrapped, because currently everything is bunched together. I would also like to reduce the size of the font in the Category axis.

    This is what it currently looks like:
    Untitled.jpg

    Note: the x-axis can't display all the ten items because the Font is too big and it doesn't wrap around.
    How can I control that?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Answers
    655
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Have you considered using the rotate property for the label:
    http://dev.sencha.com/deploy/ext-4.1...loadChart.html

    Regards,
    Scott.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    82
    Vote Rating
    0
    Syed Huda is on a distinguished road

      0  

    Default


    Rotating doesn't help obviously, because the line of text is very long:
    Untitled.jpg

    I noticed there's a label config for Ext.chart.axis.Axis that I can see in Sencha Architect, you can put a "Rotate" object: {rotate: {degrees: 270}} to rotate text.

    But what ELSE can I do in Label?
    I don't see the "Label" config in Ext 4 documentation?
    How can it be in Architect but not in the online doc? Doesn't make sense.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Answers
    655
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    It is mentioned in the online example in the code:
    http://docs.sencha.com/ext-js/4-0/#!...hart.axis.Axis

    But more information could be provided.

    You could slant the text at a 45 degree angle to get more room.
    In your case, what would you want to see for long strings?

    Scott.

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Location
    Singapore
    Posts
    22
    Vote Rating
    0
    Aranair is on a distinguished road

      0  

    Default


    Is it possible to get them to wrap?

    If it exceeds the width used by the charts above for that data point, it wraps the text to the next line. I think that might be more useful than slanting it because if they are long enough slanting it still causes all sorts of problems lol.

  6. #6
    Sencha User
    Join Date
    Dec 2012
    Posts
    14
    Answers
    1
    Vote Rating
    0
    tzalberto is on a distinguished road

      0  

    Default Any solution?

    Any solution?


    Have you found a solution for this?

    I'm also trying to wrap text but couldn't figure out how to do it.