We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Using legend text in Adornments

Thread ID:





115892 Feb 19,2014 05:38 PM UTC Feb 20,2014 01:31 PM UTC WinRT 2
Tags: Chart
Colin Desmond
Asked On February 19, 2014 05:38 PM UTC

I am trying to create a doughnut series graph without a legend (to save space), so I want to use the text that normally appears in the legend in the Adornments. I can get the XValue and YValue to appear, but not the text. How do I do this?

Karthikeyan V [Syncfusion]
Replied On February 20, 2014 01:30 PM UTC

Hi Colin,


Thank you for using Syncfusion products.


We have analysed the reported query. You can achieve your requirement by setting the SegmentLabelContent property as LabelContentPath and overriding the Label Template in AdornmentInfo.


Code snippet [XAML]:



                    <syncfusion:ChartAdornmentInfo ShowLabel="True" SegmentLabelContent="LabelContentPath" LabelTemplate="{StaticResource labelkey}"  />


        <DataTemplate x:Key="labelkey">

                <Grid   >









                    <TextBlock  Text="XValue   |" Margin="5" Grid.Row="0" Grid.Column="0"></TextBlock>

                    <TextBlock  Text="{Binding Item.ProductName}" Margin="5" Grid.Row="0" Grid.Column="1"></TextBlock>

                    <TextBlock  Text="YValue   |" Grid.Row="1" Margin="5" Grid.Column="0"></TextBlock>

                    <TextBlock  Text="{Binding YData}" Margin="5" Grid.Row="1" Grid.Column="1"></TextBlock>




We have prepared a sample based on this. You can download sample under the following location.


Please let us know if you require further assistance on this.



Karthikeyan V.

Karthikeyan V [Syncfusion]
Replied On February 20, 2014 01:31 PM UTC


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon