Hi Ronanobelta Syakura,
Greetings from Syncfusion.
Query: How to hide the 0 value from DataMarker Label.
Your requirement can be achieved by excluding the zero value from the bound ItemsSource of PieSeries using Converter.
Please have code examples,
Chart XAML:
<chart:PieSeries x:Name="pieSeries" ItemsSource="{Binding Data,Converter={StaticResource ExcludeZeroConverter}}" EnableSmartLabels = "true" XBindingPath="Name" YBindingPath="Height"> <chart:PieSeries.DataMarker> <chart:ChartDataMarker ShowLabel="True"/> </chart:PieSeries.DataMarker> </chart:PieSeries> |
ExcludeZeroConverter:
public class ExcludeZeroConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var collection = value as List<Person>; return collection != null ? collection.Where(x => x.Height != 0).ToList() : value; }
....... } |
Here, Height is the YBindingPath property.
Please download the attached sample from below link
Thanks,
Muneesh Kumar G