Hi Jake,
We can use the SelectionChanging event and restrict
the selection by setting the e.cancel event argument property as true
as per the below code example.
|
<chart:SfChart HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
SelectionChanging="SfChart_SelectionChanging">
…
</chart:SfChart>
|
|
private void SfChart_SelectionChanging(object sender, ChartSelectionChangingEventArgs
e)
{
if (e.SelectedDataPointIndex > -1)
{
var data = e.SelectedSeries.ItemsSource as ObservableCollection<Model>;
Navigation.PushAsync(new DrillDownPage() { Item = data[e.SelectedDataPointIndex] });
}
e.Cancel = true;
}
…
|
Please refer the below link for more details
https://www.syncfusion.com/kb/8704/how-to-navigate-to-other-page-with-data-point-information-of-selected-data-in-xamarin-forms
https://help.syncfusion.com/xamarin/charts/selection#events
Please check and let us know if you need any further assistance.
Regards,
Devakumar D