Substring axis labels !

2 posts, 0 answers
  1. Farshad
    Farshad avatar
    2 posts
    Member since:
    Apr 2013

    Posted 20 Apr 2013 Link to this post

    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
  2. Farshad
    Farshad avatar
    2 posts
    Member since:
    Apr 2013

    Posted 21 Apr 2013 Link to this post

    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>
  3. DevCraft banner
Back to Top