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

Substring axis labels !

1 Answer 82 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Farshad
Top achievements
Rank 1
Farshad asked on 21 Apr 2013, 01:45 AM
I have created a BarSeries chart, some of my category labels are too long and they cause the chart moves up to show the full label length, I want to shorten them to first 10 character only, I can do that while I'm adding my string to the category property in the code behind but it will also shorten the category values in the tooltip.
I want to shorten axis labels to maximum 10 characters while I still have full length of them in the tooltips.

Thanks

1 Answer, 1 is accepted

Sort by
0
Farshad
Top achievements
Rank 1
answered on 21 Apr 2013, 01:56 PM
Got it ,
Just in case someone else is looking for the same thing

<DataTemplate x:Key="LabelsTemplate">
        <TextBlock Text="{Binding}" Width="80" TextTrimming="WordEllipsis"/>
</DataTemplate>
Tags
Chart
Asked by
Farshad
Top achievements
Rank 1
Answers by
Farshad
Top achievements
Rank 1
Share this question
or