Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147838 | Sep 25,2019 12:48 PM UTC | Sep 26,2019 11:35 AM UTC | Xamarin.Forms | 1 |
![]() |
Tags: SfSunburstChart |
<sunburst:SfSunburstChart x:Name="sunburstChart" ItemsSource="{Binding DataSource}"
ValueMemberPath="EmployeesCount" SelectionChanged="SunburstChart_SelectionChanged">
</sunburst:SfSunburstChart>
|
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;
}
}
}
|
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.