This is a migrated thread and some comments may be shown as answers.

Problem with XAxis label

3 Answers 95 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
piro
Top achievements
Rank 1
piro asked on 29 Dec 2008, 03:31 PM
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 !

3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 29 Dec 2008, 05:04 PM
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.
0
piro
Top achievements
Rank 1
answered on 07 Jan 2009, 07:07 AM
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 !
0
Giuseppe
Telerik team
answered on 12 Jan 2009, 11:00 AM
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.
Tags
Chart (Obsolete)
Asked by
piro
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
piro
Top achievements
Rank 1
Share this question
or