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

Customize LabelTemplate in ChartSeriesCollection

Thread ID:





117922 Jan 8,2015 09:19 PM UTC Jan 12,2015 09:02 AM UTC WPF 4
Tags: SfChart
Dario Quispe
Asked On January 8, 2015 09:19 PM UTC


I have a ChartSeriesCollection and I would like to customize the label for each pieSeries.

I tried something like that :
<chart:ChartAdornmentInfo ShowLabel="True" LabelTemplate="{StaticResource PieLabelTemplate}" SegmentLabelContent="YValue" />

but it does not works.

I tried from code behind, but don't know how set AdornmentsInfo correctly.

I created in the sample code a DataTemplate (PieLabelTemplate) which I want to link with the AdornmentsInfo.



Attachment: LabelTemplate_fdbbef29.zip

Suresh S [Syncfusion]
Replied On January 9, 2015 10:58 AM UTC

Hi Dario,

Thanks for using Syncfusion products.

To apply adornment template in ViewModel either we can define the DataTemplate in  Application Resources and access it from ViewModel (in code behind) as like below code snippet. 

Code Snippet[C#]:
labelTemplate = App.Current.Resources["PieLabelTemplate"] as DataTemplate;

Otherwise we can create the Adornment template from code behind. We have prepared the sample based on your requirement, please download it from the  below location.

Suresh S

Attachment: LabelTemplate_a27827fb.zip

Dario Quispe
Replied On January 9, 2015 05:52 PM UTC

Thanks, it works.

But why sometimes labels are outside ? I set LabelPosition = CircularSeriesLabelPosition.Inside.
Is there a other property to force labels stay inside of pie ?



Dario Quispe
Replied On January 9, 2015 06:00 PM UTC

I update the sample code to show you labels outside.


Attachment: LabelTemplate_412843f5.zip

Suresh S [Syncfusion]
Replied On January 12, 2015 09:02 AM UTC

Hi Dario,


Sorry for the inconvenience caused.


We are able to reproduce the issue “Adornment label positioning outside for pie series”, we have created incident "133896" behalf of you for this reported issue. Our support engineer will assist you through incident under your Direct Trac account. We suggest you to follow up the incident for further reference using your direct trac account.


Our Direct Trac support system can be accessed from the following link:                              




Suresh S


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

This page will automatically be redirected to the 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