<ig:XamDoughnutChart SliceClick="DoughnutSliceClicked">
…
This topic explains how to configure selection and explosion for the slices of the XamDoughnutChart™ .
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The following table lists the configurable aspects of the XamDoughnutChart control related to slice selection.
You can enable (default setting) or disable slice selection in the XamDoughnutChart .
The following table maps the desired behavior to property settings.
The XamDoughnutChart exposes a SliceClick event used to change the selected/unselected state of a slice.
The following table maps the desired behavior to property settings.
The following code example demonstrates how to toggle the selection state of slices upon tap.
In XAML:
<ig:XamDoughnutChart SliceClick="DoughnutSliceClicked">
…
In C#:
private void DoughnutSliceClicked(object sender, SliceClickEventArgs e)
{
e.IsSelected = !e.IsSelected;
}
The following table lists the configurable aspects of the XamDoughnutChart control related to slice explosion.
You can enable (default setting) or disable slice explosion in the XamDoughnutChart .
The following table maps the desired behavior to property settings.
The following screenshot demonstrates a XamDoughnutChart with 1 slice exploded.
The XamDoughnutChart exposes a SliceClick event used to change whether a slice is exploded.
The following table maps the desired behavior to property settings.
The following code example demonstrates how to toggle the explosion state of slices upon tap.
In XAML:
<ig:XamDoughnutChart SliceClick="DoughnutSliceClicked">
…
In C#:
private void DoughnutSliceClicked(object sender, SliceClickEventArgs e)
{
e.IsExploded = !e.IsExploded;
}