From 2d8f90eb26e94488c21e12f449811610766548c3 Mon Sep 17 00:00:00 2001 From: Priyadharshini-Sf4862 Date: Fri, 24 Oct 2025 13:25:44 +0530 Subject: [PATCH 1/2] Update PieandDoughnut.md --- wpf/Charts/SeriesTypes/PieandDoughnut.md | 64 +++++++++++++++++++----- 1 file changed, 52 insertions(+), 12 deletions(-) diff --git a/wpf/Charts/SeriesTypes/PieandDoughnut.md b/wpf/Charts/SeriesTypes/PieandDoughnut.md index 0649501d0..6cec45cac 100644 --- a/wpf/Charts/SeriesTypes/PieandDoughnut.md +++ b/wpf/Charts/SeriesTypes/PieandDoughnut.md @@ -100,18 +100,32 @@ The small segments in the pie chart can be grouped into the “others” categor {% highlight xaml %} - - - - - - - + + + + + + + + + + + + + + + + + + + {% endhighlight %} @@ -131,6 +145,32 @@ The small segments in the pie chart can be grouped into the “others” categor pieSeries.AdornmentsInfo = adornmentInfo; + + public class DataLabelTemplateConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is ChartPieAdornment adornment) + { + if (adornment.Item is CountryInfo model) + { + // Case 1: Single data label item + } + else if (adornment.Item is IEnumerable group) + { + // Case 2: Grouped items (e.g., List) + } + } + + return value; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } + {% endhighlight %} {% endtabs %} From d2c860eb689bb191b157595f1089a1d89d7d71f5 Mon Sep 17 00:00:00 2001 From: Priyadharshini-Sf4862 Date: Wed, 29 Oct 2025 14:38:12 +0530 Subject: [PATCH 2/2] Update PieandDoughnut.md --- wpf/Charts/SeriesTypes/PieandDoughnut.md | 78 ++++++++---------------- 1 file changed, 26 insertions(+), 52 deletions(-) diff --git a/wpf/Charts/SeriesTypes/PieandDoughnut.md b/wpf/Charts/SeriesTypes/PieandDoughnut.md index 6cec45cac..969aa88b5 100644 --- a/wpf/Charts/SeriesTypes/PieandDoughnut.md +++ b/wpf/Charts/SeriesTypes/PieandDoughnut.md @@ -100,32 +100,30 @@ The small segments in the pie chart can be grouped into the “others” categor {% highlight xaml %} - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + {% endhighlight %} @@ -145,38 +143,14 @@ The small segments in the pie chart can be grouped into the “others” categor pieSeries.AdornmentsInfo = adornmentInfo; - - public class DataLabelTemplateConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is ChartPieAdornment adornment) - { - if (adornment.Item is CountryInfo model) - { - // Case 1: Single data label item - } - else if (adornment.Item is IEnumerable group) - { - // Case 2: Grouped items (e.g., List) - } - } - - return value; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } - {% endhighlight %} {% endtabs %} ![WPF Pie Chart with Grouping](Series_images/wpf-pie-chart-grouping.png) +You can explore our KB article on showing adornment labels for grouped values in WPF Circular Chart to learn [`how to configure and display labels for grouped values`](https://support.syncfusion.com/kb/article/21684/how-to-show-adornment-labels-for-grouped-values-in-wpf-circular-chart) effectively. + **Pie series with grouping (Mode - Angle)** {% tabs %}