public class ChartDelegate : SFChartDelegate
{
public override void WillDataPointSelect(SFChart chart, SFChartSelectionChangingInfo info)
{
var chartView = chart.Superview;
if (chartView != null)
{
foreach (var item in chartView.Subviews)
{
if (!item.IsEqual(chart))
{
var Chart1 = (item as SFChart);
if (Chart1 != null)
{
////Query – 1 solution.
NSMutableArray seriesCollection = Chart1.ValueForKey(new NSString("series")) as NSMutableArray;
for (nuint i = 0; i < seriesCollection.Count; i++)
{
var series = seriesCollection.GetItem<SFSeries>(i);
if (series.SelectedDataPointIndex != -1)
series.SelectedDataPointIndex = -1;
//// series.ReloadData(); Reloads chart
}
}
}
}
}
// Query – 2 solution
NSMutableArray numberOfSeries = chart.ValueForKey(new NSString("series")) as NSMutableArray;
for (nuint i = 0; i < numberOfSeries.Count; i++)
{
var series = numberOfSeries.GetItem<SFSeries>(i);
if ((series != null) && (series != info.SelectedSeries) && series.SelectedDataPointIndex != -1)
series.SelectedDataPointIndex = -1;
}
}
}
Sample
Please get back to us for further assistance on this.
Regards,
Sivaram.G