Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145421 | Jun 20,2019 03:00 PM UTC | Jul 2,2019 10:08 AM UTC | Xamarin.Forms | 3 |
![]() |
Tags: SfChart |
private void Forms_ViewInitialized(object sender, Xamarin.Forms.ViewInitializedEventArgs e)
{
if (e.NativeView is SfChart)
{
sfChart = sender as Syncfusion.SfChart.XForms.SfChart;
var dataPoints = ((ChartSeries)(e.NativeView as SfChart).Series[0]).ItemsSource as ObservableCollection<Syncfusion.SfChart.XForms.ChartDataPoint>;
for (int i = 0; i < dataPoints.Count; i++)
{
var data = dataPoints[i] as Syncfusion.SfChart.XForms.ChartDataPoint;
var xValue = data.XValue.ToString();
var yValue = data.YValue.ToString();
voiceText += xValue + yValue;
}
(e.NativeView as SfChart).SelectionChanged += MainActivity_SelectionChanged;
}
}
private void MainActivity_SelectionChanged(object sender, SfChart.SelectionChangedEventArgs e)
{
(sender as SfChart).AnnounceForAccessibility(voiceText);
} |
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.