Maximize productivity with
30% off* for a limited time
using BOOSTDEV30.
Includes 3- and 5-packs.
*Some exclusions may apply.New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.
<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; } ....... } |