Problem with XAxis label

Thread is closed for posting
4 posts, 0 answers
  1. piro
    piro avatar
    6 posts
    Member since:
    Mar 2008

    Posted 29 Dec 2008 Link to this post

    I set XAxis label with property AlignedPositions.Left and outside of chart  . But some time , a label is too long  and this text display inside chart . How can I solve this problem ?
    I want to do as  label can auto cut those text that display inside the chart and display it with "..."
    Example . XAxis is "This is a label. It is too long ." I want to display as "This is label ..."  if it length is out of range of XAxis and display in to chart content .

    Second, XAxis label with property AlignedPositions.Left  , i want to ask that how to resize  range  of XAxis , make it can display label more length .  I only start study about chart. Please show me solution!

    Thanks very much !
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 29 Dec 2008 Link to this post

    Hi piro,

    If you would like to display ellipsis (...), you need to set the AxisLabel.TextBlock.Appearance.MaxLength property to the desired number of characters to be displayed prior to showing the ellipsis.

    Alternatively we would suggest you to review the AutoTextWrap feature of the control (documentation here), that can be combined with the AutoLayout feauture (documentation here) to optimally utilize the designated space for the chart control, and wrap the axis label automatically whenever it cannot fit.


    Greetings,
    Manuel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. piro
    piro avatar
    6 posts
    Member since:
    Mar 2008

    Posted 07 Jan 2009 Link to this post

    Thanks for your help , but I have more one problem.
     I was displayed XAxis lable as ellipse(...).  But I can't  set property AxisLabel.TextBlock.Appearance.MaxLength
     When I set  AxisLabel.TextBlock.Appearance.MaxLength =5  or set AxisLabel.TextBlock.Appearance.MaxLength =200 , there isn't any change .
    My perpose is that when I set  AxisLabel.TextBlock.Appearance.MaxLength =5  XAxis lable display as esllipse(....) , and where I set
    AxisLabel.TextBlock.Appearance.MaxLength =200  it display full text

    thanks !
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 12 Jan 2009 Link to this post

    Hello piro,

    We are unable to reproduce the problematic behavior you are experiencing -- find attached a sample application that toggles the MaxLength property and behaves as expected in our local tests.

    Hope this helps.


    Kind regards,
    Manuel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top