The Sunburst Chart control allows you to select data points by clicking or touching a sunburst slice. Use the SelectionMode property to specify whether you want to allow selection by data point or no selection at all(default). The three different options provided are as follows:
When the SelectionMode is set to Point, you can change the position of the selected sunburst slice by setting the SelectedItemPosition property. Also, you can set the SelectedItemOffset property to move the selected sunburst slice away from the center. Setting the SelctionMode property to Point causes the Sunburst to update the selection property when the user clicks or touch on a sunburst slice.
The Sunburst offers two additional properties to customize the selection:The image below show how the Sunburst chart appears after you set the SelectionMode property.
The following code example demonstrates how to set these properties in C# and XAML. This examples uses the sample created in the Quick Start section.
C# |
Copy Code
|
---|---|
this.sunburst.SelectionMode = ChartSelectionModeType.Point;
sunburst.SelectedItemPosition = ChartPositionType.Top;
sunburst.SelectedItemOffset = 0.2;
|
XAML |
Copy Code
|
---|---|
<c1:C1Sunburst x:Name="sunburst" Binding="Value" BindingName="Year,Quarter,Month" ToolTipContent="{}{name} {y}" LegendPosition="Bottom" SelectionMode="Point" SelectedItemPosition="Top" SelectedItemOffset="0.2"> |