I just realised that what I'm asking for isn't possible given the way you do the drawing of the ellipses for the
FastScatterBitmapSeries. It seems to be a simple loop of all the points which calls DrawEllipse.
An alternative solution presented itself, so now I have my data displaying correctly. It just involved creating a selective list of the data points and having a separate FastScatterBitmapSeries display those points.
<syncfusion:FastScatterBitmapSeries x:Name="series" Palette="Custom" EnableAnimation="True" ItemsSource="{Binding Data}" ScatterWidth="5" ScatterHeight="5"
XBindingPath="XValue" YBindingPath="YValue" Label="First" >
</syncfusion:FastScatterBitmapSeries> |
ViewModel view = new ViewModel();
ChartColorModel colorModel = new ChartColorModel();
foreach(var item in view.Data)
{
if (item.flag == true)
colorModel.CustomBrushes.Add(new SolidColorBrush(Colors.Blue));
else
colorModel.CustomBrushes.Add(new SolidColorBrush(Colors.Red));
}
series.ColorModel = colorModel; |
Thank you very much Durgadev! The method you provided works well. I've expanded on it to bind the ColorModel to a property in the view-model, and the processing code is in a custom Behavior to update that ColorModel property.
Thanks again!