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

Does the content of the chart AxisX can wrap?

2 Answers 25 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Brittany
Top achievements
Rank 1
Brittany asked on 19 Aug 2011, 09:29 AM
Hi,
Due to the content of chart AxisX is too long to dispaly on chart, I want to make the content wrap and I haven't found some methods to complete it.
Could you please tell me how to make the content of chart AxisX wrap?

Many thanks.

2 Answers, 1 is accepted

Sort by
0
Sia
Telerik team
answered on 19 Aug 2011, 03:45 PM
Hello Brittany,

What do you need to wrap - the axis labels or the axis title?

If you need to style the axis labels, please use the following style:
<Style x:Key="CustomLabel" TargetType="TextBlock">
    <Setter Property="TextAlignment" Value="Center" />
    <Setter Property="Padding" Value="1" />
    <Setter Property="Width" Value="100" />
    <Setter Property="TextWrapping" Value="Wrap" />
</Style>

and apply it:
this.RadChart.DefaultView.ChartArea.AxisX.AxisStyles.ItemLabelStyle = this.Resources["CustomLabel"] as Style;

Best wishes,
Sia
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Brittany
Top achievements
Rank 1
answered on 22 Aug 2011, 02:01 AM
Thanks very much!
My problem have been resolved.
Tags
Chart
Asked by
Brittany
Top achievements
Rank 1
Answers by
Sia
Telerik team
Brittany
Top achievements
Rank 1
Share this question
or