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. Image for the cookie policy date
close icon

Percentage label for PieSeries in SeriesCollection

Hi,

I would like to show values of PieSeries in percentage.
I created a DataTemplate for label template ChartAdornmentInfo to format pie labels.
I created a PieLabelConverter for add "%" symbol of value et set the correspondent percentage value, but I don't have access to all series value to change for percentage value.
I tried to set SegmentLabelContent to LabelContent.Percentage, but it does not work.
Should I calculate mysefl the percentage ? If so, then how I get values of items of each series in my converter ?

Thanks

Dario Quispe


Attachment: Percentage_ac6732be.zip

3 Replies

SS Sheik Syed Abthaheer M Syncfusion Team January 15, 2015 08:34 AM UTC

Hi Dario,

Thanks for using Syncfusion products.

We have analyzed your reported sample and we need to bind the property (like YData,XData) in Adornment label template when we set SegmentLabelContent as LabelContentPath. Otherwise we no need to bind the property(in sample you have bound the property, that’s why you can’t access the converter).
If you want to show values in percentage then you can use SegmentLabelContent as Percentage(by default % symbol will be add) or if you want add % symbol in YValue then you can use converter. We have prepared the sample based on your requirement. Please find the sample in the below location.

Sample: AdornmentPercentage.zip


Also please find the below UG documentation for customizing adornments in SfChart.

Link: http://help.syncfusion.com/ug/wpf/documents/customizingadornment.htm

Please let us know if you need any further assistance.

Regards,
M.Sheik

 




DQ Dario Quispe January 16, 2015 06:01 PM UTC

Thanks, it works.

Dario


RA Rachel A Syncfusion Team January 19, 2015 06:34 AM UTC

Hi Dario,

Thanks for the update.

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

 

Thanks,

Rachel.A



Loader.
Live Chat Icon For mobile
Up arrow icon