Wrap the text on the labels in Bar Chart

2 posts, 0 answers
  1. Shobha
    Shobha avatar
    1 posts
    Member since:
    Oct 2013

    Posted 08 Oct 2013 Link to this post

    Hi,

       I have a horizontal stacked Bar chart and I have labels for each of the sections in the Bar chart. Is there any option to wrap the text on the labels?, so that they don't overlap. Also please give me some pointers on adding legend in Bar chart.
    (Im using windows phone8)

    Thanks
    Shobha
  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    550 posts

    Posted 10 Oct 2013 Link to this post

    Hello Shobha,

    Thank you for the question.

    If you wish to wrap the text of the labels, you can use the LabelTemplate property of the axis:

    <chart:CategoricalAxis>
        <chart:CategoricalAxis.LabelTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding}" Width="70" TextWrapping="Wrap"/>
            </DataTemplate>
        </chart:CategoricalAxis.LabelTemplate>
    </chart:CategoricalAxis>

    You can also try these axis settings:
    <chart:CategoricalAxis LabelRotationAngle="30" LabelFitMode="Rotate">
     
    <chart:CategoricalAxis LabelFitMode="MultiLine"/>

    As to the legend, the chart does not implement such feature, but you can vote for it in our Ideas & Feedback Portal to raise its priority.

    I hope this was useful. Please, do not hesitate to contact us if you have further questions.

    Regards,
    Rositsa Topchiyska
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINDOWS PHONE 7.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top