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

PieChart Adornements / Formatconverter

How can I apply a format converter in a pie chart adornement?

3 Replies

SS Sheik Syed Abthaheer M Syncfusion Team September 15, 2014 03:47 PM UTC

Hi Rudiger,

Thanks for using Syncfusion products.

You can apply the adornment label format by using the SegmentLabelFormat property of ChartAdonrmentInfo as shown in the below code snippet.

Code Snippet [Xaml]:

<chart:ChartAdornmentInfo AdornmentsPosition="TopAndBottom" SegmentLabelFormat="0.00"  ShowLabel="True" SegmentLabelContent="YValue">

Please let us know if you have any queries.

M. Sheik

RH Rüdiger Heicappell September 18, 2014 08:08 PM UTC

I should explain my query more in detail: I want to to format the label to 2 digits and an percent sign attached Using a textbox, this can be done by a format converter as follows:

<TextBlock   Grid.Row="0" Grid.Column="2" x:Name="ShowPercent" FontSize="18" 
                                                 Text="{Binding Percent,
                                                 Converter={StaticResource StringFormatConverter}, 
                                                 ConverterParameter='{}{0:P}'}" />

The question is: how can I format the label of the pie chart in the same way as with the textbox?

SJ Sumathi Jayaraj Syncfusion Team September 23, 2014 04:49 AM UTC

Hi Rudiger,

Thanks for your update.

We have analyzed your query and we have prepared a sample as per your requirements. Please find the sample in the following attachment.

Please let us know if you have any queries.

Sumathi J

Attachment: PieSeriesWP_448a7153.zip

Live Chat Icon For mobile
Up arrow icon