private void SunburstChart_SelectionChanged(object sender, Syncfusion.SfSunburstChart.XForms.SelectionChangedEventArgs e)
{
if (e.SelectedSegment != null)
{
stackLayout.IsVisible = true;
if (!e.IsSelected)
{
stackLayout.IsVisible = false;
}
if (e.SelectedSegment.CurrentLevel == 0)
{
countryLabel.Text = "Continent: " + e.SelectedSegment.Category;
populationLabel.Text = "Employee Count: " + e.SelectedSegment.Value;
}
else if (e.SelectedSegment.CurrentLevel == 1)
{
countryLabel.Text = "Category: " + e.SelectedSegment.Category;
populationLabel.Text = "Employee Count: " + e.SelectedSegment.Value;
}
else if (e.SelectedSegment.CurrentLevel == 2)
{
countryLabel.Text = "Designation: " + e.SelectedSegment.Category;
populationLabel.Text = "Employee Count: " + e.SelectedSegment.Value;
}
else
{
countryLabel.Text = "Platform: " + e.SelectedSegment.Category;
populationLabel.Text = "Employee Count: " + e.SelectedSegment.Value;
}
}
}
|