Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147057 | Aug 30,2019 10:12 AM UTC | Sep 6,2019 05:11 AM UTC | Xamarin.Forms | 3 |
![]() |
Tags: SfChart |
<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> |
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; } ....... } |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.