From cf62fd11cc0571befa4f7c10f556165dbfdb6b52 Mon Sep 17 00:00:00 2001 From: Priyadharshini-Sf4862 Date: Fri, 24 Oct 2025 13:31:48 +0530 Subject: [PATCH 1/3] 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 d9f3a55d4fee1b199fa4e9371b973fe1993334e7 Mon Sep 17 00:00:00 2001 From: Priyadharshini-Sf4862 Date: Wed, 29 Oct 2025 14:25:07 +0530 Subject: [PATCH 2/3] Update PieandDoughnut.md --- wpf/Charts/SeriesTypes/PieandDoughnut.md | 78 ++++++++---------------- 1 file changed, 25 insertions(+), 53 deletions(-) diff --git a/wpf/Charts/SeriesTypes/PieandDoughnut.md b/wpf/Charts/SeriesTypes/PieandDoughnut.md index 6cec45cac..7f126016a 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,32 +143,6 @@ 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 %} @@ -685,4 +657,4 @@ N> You can refer to our [WPF Doughnut Chart](https://www.syncfusion.com/wpf-cont ## See also -[`How to create Pie Chart in C# WPF`](https://www.syncfusion.com/kb/10789/how-to-create-pie-chart-in-c-wpf) +[`How to create Pie Chart in C# WPF`](https://www.syncfusion.com/kb/10789/how-to-create-pie-chart-in-c-wpf) \ No newline at end of file From 9d522323344177d78d96684b6c9a43c4da979f7c Mon Sep 17 00:00:00 2001 From: Priyadharshini-Sf4862 Date: Wed, 29 Oct 2025 14:36:21 +0530 Subject: [PATCH 3/3] Update PieandDoughnut.md --- wpf/Charts/SeriesTypes/PieandDoughnut.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wpf/Charts/SeriesTypes/PieandDoughnut.md b/wpf/Charts/SeriesTypes/PieandDoughnut.md index 7f126016a..a85f04579 100644 --- a/wpf/Charts/SeriesTypes/PieandDoughnut.md +++ b/wpf/Charts/SeriesTypes/PieandDoughnut.md @@ -106,7 +106,7 @@ The small segments in the pie chart can be grouped into the “others” categor + Margin="3" Foreground="White"> @@ -149,6 +149,8 @@ The small segments in the pie chart can be grouped into the “others” categor ![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 %}