menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfSunburstChart - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfSunburstChart

    Represents hierarchical data with concentric circles, where each ring signifies a hierarchy level, and segments denote data categories.

    Inheritance
    System.Object
    SfSunburstChart
    Implements
    Microsoft.Maui.IContentView
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Namespace: Syncfusion.Maui.SunburstChart
    Assembly: Syncfusion.Maui.SunburstChart.dll
    Syntax
    public class SfSunburstChart : View, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, ITouchListener, ITapGestureListener, IDoubleTapGestureListener, IGestureListener, IParentThemeElement, IThemeElement
    Remarks

    The Sunburst chart control ensures a well-defined hierarchical structure of the data and effectively communicates relationships between different levels of information.

    SfSunburstChart class properties provide an option to add the levels collection, allowing customization of the chart elements such as legend, data label, center view, and tooltip features.

    Levels

    Levels are used to visualize different layers or depths in a hierarchy, aiding in the visualization of structured data. SfSunburstChart offers Levels property.

    To add the levels, create an instance of the required SunburstHierarchicalLevel class, and add it to the GroupMemberPath property.

    • MainPage.xaml
    • MainPage.xaml.cs
    • SunburstModel.cs
    • SunburstViewModel.cs
     
    <sunburst:SfSunburstChart  ItemsSource="{Binding DataSource}" ValueMemberPath="EmployeesCount">
    
      <sunburst:SfSunburstChart.BindingContext>
           <model:SunburstViewModel x:Name="viewModel"/>
      </sunburst:SfSunburstChart.BindingContext>
    
      <sunburst:SfSunburstChart.Levels>
        <sunburst:SunburstHierarchicalLevel GroupMemberPath = "Country" />
        <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobDescription" />
        <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobRole" />
      </sunburst:SfSunburstChart.Levels>
    
    </sunburst:SfSunburstChart>
     SfSunburstChart sunburstChart = new SfSunburstChart();
    
     this.BindingContext = new SunburstViewModel();
    
     sunburstChart.SetBinding(SfSunburstChart.ItemsSourceProperty, "DataSource");
     sunburstChart.ValueMemberPath = "EmployeesCount";
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "Country" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobDescription" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobGroup" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobRole" });
    
     this.Content = sunburstChart;
        public class SunburstModel
        {
            public string JobDescription { get; set; }
            public string JobGroup { get; set; }
            public string JobRole { get; set; }
            public double EmployeesCount { get; set; }
            public double Count { get; set; }
            public string Country { get; set; }
        }
    public ObservableCollection<SunburstModel> DataSource { get; set; }
    
    public SunburstViewModel()
    {
       DataSource = new ObservableCollection<SunburstModel>
       {
            new SunburstModel { Country = "USA", JobDescription = "Sales", JobGroup="Executive", EmployeesCount = 50 , Count = 200},
            new SunburstModel { Country = "USA", JobDescription = "Sales", JobGroup = "Analyst", EmployeesCount = 40 },
            new SunburstModel { Country = "USA", JobDescription = "Marketing", EmployeesCount = 40 },
            new SunburstModel { Country = "USA", JobDescription = "Technical", JobGroup = "Testers", EmployeesCount = 35 },
            new SunburstModel { Country = "USA", JobDescription = "Technical", JobGroup = "Developers", JobRole = "Windows", EmployeesCount = 175 },
            new SunburstModel { Country = "USA", JobDescription = "Technical", JobGroup = "Developers", JobRole = "Web", EmployeesCount = 70 },
            new SunburstModel { Country = "USA", JobDescription = "Management", EmployeesCount = 40 },
            new SunburstModel { Country = "USA", JobDescription = "Accounts", EmployeesCount = 60 },
            new SunburstModel { Country = "India", JobDescription = "Technical", JobGroup = "Testers", EmployeesCount = 33 },
            new SunburstModel { Country = "India", JobDescription = "Technical", JobGroup = "Developers", JobRole = "Windows", EmployeesCount = 125 },
            new SunburstModel { Country = "India", JobDescription = "Technical", JobGroup = "Developers", JobRole = "Web", EmployeesCount = 60 },
            new SunburstModel { Country = "India", JobDescription = "HR Executives", EmployeesCount = 70 },
            new SunburstModel { Country = "India", JobDescription = "Accounts", EmployeesCount = 45 },
            new SunburstModel { Country = "Germany", JobDescription = "Sales", JobGroup = "Executive", EmployeesCount = 30 },
            new SunburstModel { Country = "Germany", JobDescription = "Sales", JobGroup = "Analyst", EmployeesCount = 40 },
            new SunburstModel { Country = "Germany", JobDescription = "Marketing", EmployeesCount = 50 },
            new SunburstModel { Country = "Germany", JobDescription = "Technical", JobGroup = "Testers", EmployeesCount = 40 },
            new SunburstModel { Country = "Germany", JobDescription = "Technical", JobGroup = "Developers", JobRole = "Windows", EmployeesCount = 65 },
            new SunburstModel { Country = "Germany", JobDescription = "Technical", JobGroup = "Developers", JobRole = "Web", EmployeesCount = 27 },
            new SunburstModel { Country = "Germany", JobDescription = "Management", EmployeesCount = 33 },
            new SunburstModel { Country = "Germany", JobDescription = "Accounts", EmployeesCount = 55 },
            new SunburstModel { Country = "UK", JobDescription = "Technical", JobGroup = "Testers", EmployeesCount = 25 },
            new SunburstModel { Country = "UK", JobDescription = "Technical", JobGroup = "Developers", JobRole = "Windows", EmployeesCount = 96 },
            new SunburstModel { Country = "UK", JobDescription = "Technical", JobGroup = "Developers", JobRole = "Web", EmployeesCount = 55 },
            new SunburstModel { Country = "UK", JobDescription = "HR Executives", EmployeesCount = 60 },
            new SunburstModel { Country = "UK", JobDescription = "Accounts", EmployeesCount = 30 }
       };
    }

    Legend

    The Legend includes data points from the first-level items. The information provided in each legend item helps identify the corresponding sunburst sub levels. The Levels of GroupMemberPath property value will be displayed in the legend item.

    To render a legend, create an instance of SunburstLegendand assign it to the Legend property.

    • MainPage.xaml
    • MainPage.xaml.cs
     
    <sunburst:SfSunburstChart  ItemsSource="{Binding DataSource}" ValueMemberPath="EmployeesCount">
    
      <sunburst:SfSunburstChart.BindingContext>
            <model:SunburstViewModel x:Name="viewModel"/>
      </sunburst:SfSunburstChart.BindingContext>
    
      <sunburst:SfSunburstChart.Legend>
            <sunburst:SunburstLegend x:Name="legend" >
      </sunburst:SunburstLegend>
    
      <sunburst:SfSunburstChart.Levels>
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "Country" />
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobDescription" />
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobRole" />
      </sunburst:SfSunburstChart.Levels>
    
    </sunburst:SfSunburstChart>
     SfSunburstChart sunburstChart = new SfSunburstChart();
    
     this.BindingContext = new SunburstViewModel();
    
     sunburstChart.Legend = new SunburstLegend();
    
     sunburstChart.SetBinding(SfSunburstChart.ItemsSourceProperty, "DataSource");
     sunburstChart.ValueMemberPath = "EmployeesCount";
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "Country" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobDescription" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobGroup" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobRole" });
    
     this.Content = sunburstChart;

    Data Label

    Data labels are used to display values related to a sunburst chart segment. To render the data labels, you need to enable the ShowLabels property as true in SfSunburstChart class.

    To customize the sunburst chart data labels rotation mode using SunburstLabelRotationMode and its default value is Angle, overflow mode using SunburstLabelOverflowMode and its default value is Hide, and label styles, you need to create an instance of SunburstDataLabelSettings and set it to the DataLabelSettings property.

    • MainPage.xaml
    • MainPage.xaml.cs
    <sunburst:SfSunburstChart  ItemsSource="{Binding DataSource}" 
                 ShowLabels="True"   ValueMemberPath="EmployeesCount">
    
      <sunburst:SfSunburstChart.BindingContext>
            <model:SunburstViewModel x:Name="viewModel"/>
      </sunburst:SfSunburstChart.BindingContext>
    
      <sunburst:SfSunburstChart.DataLabelSettings>
              <sunburst:SunburstDataLabelSettings FontSize="13" FontAttributes="Italic"
                                                 RotationMode="Angle" OverFlowMode="Trim" />
      </sunburst:SfSunburstChart.DataLabelSettings>
    
      <sunburst:SfSunburstChart.Levels>
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "Country" />
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobDescription" />
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobRole" />
      </sunburst:SfSunburstChart.Levels>
    
    </sunburst:SfSunburstChart>
    SfSunburstChart sunburstChart = new SfSunburstChart();
    
     this.BindingContext = new SunburstViewModel();
    
     sunburstChart.ShowLabels = true;
     sunburstChart.DataLabelSettings = new SunburstDataLabelSettings()
     {
           OverFlowMode = SunburstLabelOverflowMode.Trim,
           RotationMode = SunburstLabelRotationMode.Angle,
           FontAttributes = FontAttributes.Italic,
           FontSize = 13
     };
     sunburstChart.SetBinding(SfSunburstChart.ItemsSourceProperty, "DataSource");
     sunburstChart.ValueMemberPath = "EmployeesCount";
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "Country" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobDescription" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobGroup" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobRole" });
    
     this.Content = sunburstChart;

    Tooltip

    Tooltip displays information while tapping or mouse hovering on the segment. To display the tooltip on the sunburst chart, you need to set the EnableTooltip property as true in SfSunburstChart.

    To customize the appearance of the tooltip elements like Background, TextColor, and Font, create an instance of the SunburstTooltipSettings class, modify the values, and assign it to the TooltipSettings property in SfSunburstChart.

    • MainPage.xaml
    <sunburst:SfSunburstChart  ItemsSource="{Binding DataSource}" 
                 EnableTooltip="True"   ValueMemberPath="EmployeesCount">
    
      <sunburst:SfSunburstChart.BindingContext>
            <model:SunburstViewModel x:Name="viewModel"/>
      </sunburst:SfSunburstChart.BindingContext>
    
      <sunburst:SfSunburstChart.TooltipSettings>
            <sunburst:SunburstTooltipSettings />
      </sunburst:SfSunburstChart.TooltipSettings>
    
      <sunburst:SfSunburstChart.Levels>
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "Country" />
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobDescription" />
            <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobRole" />
      </sunburst:SfSunburstChart.Levels>
    
    </sunburst:SfSunburstChart>

    [MainPage.xaml.cs](#tab/tabid-10

    SfSunburstChart sunburstChart = new SfSunburstChart();
    
     this.BindingContext = new SunburstViewModel();
    
     sunburstChart.TooltipSettings = new SunburstTooltipSettings();
    
     sunburstChart.SetBinding(SfSunburstChart.ItemsSourceProperty, "DataSource");
     sunburstChart.ValueMemberPath = "EmployeesCount";
     sunburstChart.EnableTooltip = true;
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "Country" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobDescription" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobGroup" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobRole" });
    
     this.Content = sunburstChart;

    CenterView

    Center is used to share additional information about the sunburst chart. The binding context of the Centerview will be the respective sunburst. To display the center view on the sunburst chart, you need to set theCenterView property in SfSunburstChart.

    CenterHoleSize is used to prevent overlapping with segments in the sunburst center view.

    # [MainPage.xaml](#tab/tabid-11)
    <sunburst:SfSunburstChart  ItemsSource="{Binding DataSource}" 
                 ValueMemberPath="EmployeesCount">
    

    <sunburst:SfSunburstChart.BindingContext> <model:SunburstViewModel x:Name="viewModel"/> </sunburst:SfSunburstChart.BindingContext>

    <sunburst:SfSunburstChart.CenterView> <StackLayout Orientation="Vertical" HeightRequest="{Binding CenterHoleSize}" WidthRequest="{Binding CenterHoleSize}" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"> <Label Text = "CenterView" /> </StackLayout> </sunburst:SfSunburstChart.CenterView>

    <sunburst:SfSunburstChart.Levels> <sunburst:SunburstHierarchicalLevel GroupMemberPath = "Country" /> <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobDescription" /> <sunburst:SunburstHierarchicalLevel GroupMemberPath = "JobRole" /> </sunburst:SfSunburstChart.Levels>

    </sunburst:SfSunburstChart>

    [MainPage.xaml.cs](#tab/tabid-12

    SfSunburstChart sunburstChart = new SfSunburstChart();
    
     this.BindingContext = new SunburstViewModel();
    
       StackLayout layout = new StackLayout();
       layout.HorizontalOptions = LayoutOptions.CenterAndExpand;
       layout.VerticalOptions = LayoutOptions.CenterAndExpand;
       layout.SetBinding(HeightRequestProperty, "CenterHoleSize");
       layout.SetBinding(WidthRequestProperty, "CenterHoleSize");
    
       Label label = new Label();
       label.Text = "CenterView";
       layout.Children.Add(label);
       sunburstChart.CenterView = layout;
    
     sunburstChart.SetBinding(SfSunburstChart.ItemsSourceProperty, "DataSource");
     sunburstChart.ValueMemberPath = "EmployeesCount";
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "Country" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobDescription" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobGroup" });
     sunburstChart.Levels.Add(new SunburstHierarchicalLevel() { GroupMemberPath = "JobRole" });
    
     this.Content = sunburstChart;

    Constructors

    SfSunburstChart()

    Initializes a new instance of the SfSunburstChart class.

    Declaration
    public SfSunburstChart()

    Fields

    AnimationDurationProperty

    Identifies the AnimationDuration bindable property.

    Declaration
    public static readonly BindableProperty AnimationDurationProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CenterViewProperty

    Identifies the CenterView bindable property.

    Declaration
    public static readonly BindableProperty CenterViewProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    DataLabelSettingsProperty

    Identifies the DataLabelSettings bindable property.

    Declaration
    public static readonly BindableProperty DataLabelSettingsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    EnableAnimationProperty

    Identifies the EnableAnimation bindable property.

    Declaration
    public static readonly BindableProperty EnableAnimationProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    EnableDrillDownProperty

    Identifies the EnableDrillDown bindable property.

    Declaration
    public static readonly BindableProperty EnableDrillDownProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    EnableTooltipProperty

    Identifies the EnableTooltip bindable property.

    Declaration
    public static readonly BindableProperty EnableTooltipProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    EndAngleProperty

    Identifies the EndAngle bindable property.

    Declaration
    public static readonly BindableProperty EndAngleProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    InnerRadiusProperty

    Identifies the InnerRadius bindable property.

    Declaration
    public static readonly BindableProperty InnerRadiusProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ItemsSourceProperty

    Identifies the ItemsSource bindable property.

    Declaration
    public static readonly BindableProperty ItemsSourceProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    LegendProperty

    Identifies the Legend bindable property.

    Declaration
    public static readonly BindableProperty LegendProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    LevelsProperty

    Identifies the Levels bindable property.

    Declaration
    public static readonly BindableProperty LevelsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    PaletteBrushesProperty

    Identifies the PaletteBrushes bindable property.

    Declaration
    public static readonly BindableProperty PaletteBrushesProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    RadiusProperty

    Identifies the Radius bindable property.

    Declaration
    public static readonly BindableProperty RadiusProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SelectionSettingsProperty

    Identifies the SelectionSettings bindable property.

    Declaration
    public static readonly BindableProperty SelectionSettingsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowLabelsProperty

    Identifies the ShowLabels bindable property.

    Declaration
    public static readonly BindableProperty ShowLabelsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    StartAngleProperty

    Identifies the StartAngle bindable property.

    Declaration
    public static readonly BindableProperty StartAngleProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    StrokeProperty

    Identifies the Stroke bindable property.

    Declaration
    public static readonly BindableProperty StrokeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    StrokeWidthProperty

    Identifies the StrokeWidth bindable property.

    Declaration
    public static readonly BindableProperty StrokeWidthProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TitleProperty

    Identifies the Title bindable property.

    Declaration
    public static readonly BindableProperty TitleProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ToolbarSettingsProperty

    Identifies the ToolbarSettings bindable property.

    Declaration
    public static readonly BindableProperty ToolbarSettingsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TooltipSettingsProperty

    Identifies the TooltipSettings bindable property.

    Declaration
    public static readonly BindableProperty TooltipSettingsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TooltipTemplateProperty

    Identifies the TooltipTemplate bindable property.

    Declaration
    public static readonly BindableProperty TooltipTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ValueMemberPathProperty

    Identifies the ValueMemberPath bindable property.

    Declaration
    public static readonly BindableProperty ValueMemberPathProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    Properties

    AnimationDuration

    Gets or sets the Animation duration property, used to set the duration for the animation to be done.

    Declaration
    public double AnimationDuration { get; set; }
    Property Value
    Type
    System.Double

    CenterHoleSize

    Gets the size of the sunburst center hole.

    Declaration
    public double CenterHoleSize { get; }
    Property Value
    Type
    System.Double

    CenterView

    Gets or sets the view to be added to the center of the sunburst chart.

    Declaration
    public View CenterView { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.View

    It accepts any Microsoft.Maui.Controls.View object, and its default value is null.

    DataLabelSettings

    Gets or sets a DataLabelSettings, used to customize the appearance of the displaying data labels in the sunburst chart.

    Declaration
    public SunburstDataLabelSettings DataLabelSettings { get; set; }
    Property Value
    Type Description
    SunburstDataLabelSettings

    This property takes SunburstDataLabelSettings instance as value and its default value is null.

    EnableAnimation

    Gets or sets a value indicating whether the animation is enabled for the sunburst chart.

    Declaration
    public bool EnableAnimation { get; set; }
    Property Value
    Type Description
    System.Boolean

    It accepts bool values and its default value is False.

    EnableDrillDown

    Gets or sets a value indicating whether to enable the drill-down settings.

    Declaration
    public bool EnableDrillDown { get; set; }
    Property Value
    Type
    System.Boolean

    EnableTooltip

    Gets or sets a value indicating whether the tooltip is visible when mouse hovers or taps on the segment.

    Declaration
    public bool EnableTooltip { get; set; }
    Property Value
    Type Description
    System.Boolean

    It accepts bool values and its default value is False.

    EndAngle

    Gets or sets the end angle for the sunburst chart.

    Declaration
    public double EndAngle { get; set; }
    Property Value
    Type Description
    System.Double

    It accepts double values, and the default value is 360.

    InnerRadius

    Gets or sets the radius property. This property value is used for defining the sunburst size. Value must be specified from 0 to 1.

    Declaration
    public double InnerRadius { get; set; }
    Property Value
    Type Description
    System.Double

    It accepts double values, and the default value is 0.25. Here, the value is between 0 and 1.

    ItemsSource

    Gets or sets a data points collection that will be used to plot a chart.

    Declaration
    public object ItemsSource { get; set; }
    Property Value
    Type
    System.Object

    Legend

    Gets or sets a legend that is used to display a legend that helps to identify the parent of each level in the sunburst chart.

    Declaration
    public SunburstLegend Legend { get; set; }
    Property Value
    Type Description
    SunburstLegend

    This property takes a SunburstLegend instance as value and its default value is null.

    Levels

    Gets or sets the levels for the sunburst chart.

    Declaration
    public SunburstLevelCollection Levels { get; set; }
    Property Value
    Type
    SunburstLevelCollection

    PaletteBrushes

    Gets or sets an IList of brush collection property, used as the color scheme for the sunburst chart.

    Declaration
    public IList<Brush> PaletteBrushes { get; set; }
    Property Value
    Type
    System.Collections.Generic.IList<Microsoft.Maui.Controls.Brush>

    Radius

    Gets or sets the radius property, used for defining the sunburst size.

    Declaration
    public double Radius { get; set; }
    Property Value
    Type Description
    System.Double

    It accepts double values, and the default value is 0.9. Here, the value is between 0 and 1.

    SelectionSettings

    Gets or sets the settings for segment selection in the sunburst chart.

    Declaration
    public SunburstSelectionSettings SelectionSettings { get; set; }
    Property Value
    Type Description
    SunburstSelectionSettings

    An instance of SelectionSettings class.

    Examples
    <sunburst:SfSunburstChart>
        <sunburst:SfSunburstChart.SelectionSettings>
            <sunburst:SunburstSelectionSettings 
                Type="Child" 
                SunburstSelectionDisplayMode="HighlightByColor"
                Fill="Blue" />
        </sunburst:SfSunburstChart.SelectionSettings>
    </sunburst:SfSunburstChart>
    • MainPage.xaml.cs
    SfSunburstChart sunburstChart = new SfSunburstChart();
    
    sunburstChart.SelectionSettings = new SunburstSelectionSettings
    {
        Type = Type = SunburstSelectionType.Child,
        DisplayMode = SunburstSelectionDisplayMode.HighlightByColor,
        Fill = new SolidColorBrush(Colors.Blue)
    }; 

    ShowLabels

    Gets or sets a value indicating whether the label is visible.

    Declaration
    public bool ShowLabels { get; set; }
    Property Value
    Type Description
    System.Boolean

    It accepts bool values and its default value is False.

    StartAngle

    Gets or sets the start angle for the Sunburst chart.

    Declaration
    public double StartAngle { get; set; }
    Property Value
    Type Description
    System.Double

    It accepts double values, and the default value is 0.

    Stroke

    Gets or sets the stroke color property used to define the stroke color for the Sunburst chart.

    Declaration
    public Brush Stroke { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.Brush

    It accepts Microsoft.Maui.Controls.Brush values and its default value is White/>.

    StrokeWidth

    Gets or sets the stroke width property for customizing the width of the sunburst chart segment border.

    Declaration
    public double StrokeWidth { get; set; }
    Property Value
    Type Description
    System.Double

    It accepts double values and its default value is 1.

    Title

    Gets or sets the title for the chart. It supports the string or any view as a title.

    Declaration
    public object Title { get; set; }
    Property Value
    Type Description
    System.Object

    The default value is null.

    ToolbarSettings

    Gets or sets the drill down settings for the chart.

    Declaration
    public SunburstToolbarSettings ToolbarSettings { get; set; }
    Property Value
    Type Description
    SunburstToolbarSettings

    This property takes a ToolbarSettings instance as value and its default value is null.

    Examples
    <chart:SfSunburstChart>
        <chart:SfSunburstChart.SunburstDrillDownSettings>
            <chart:SunburstDrillDownSettings Enable="True">
        <chart:SfSunburstChart.SunburstDrillDownSettings>
    <chart:SfSunburstChart>

    TooltipSettings

    Gets or sets the tooltip settings property, used to customize the tooltip.

    Declaration
    public SunburstTooltipSettings TooltipSettings { get; set; }
    Property Value
    Type Description
    SunburstTooltipSettings

    This property takes SunburstTooltipSettings instance as value and its default value is null.

    TooltipTemplate

    Gets or sets the data template for the tooltip, which can customize the tooltip labels.

    Declaration
    public DataTemplate TooltipTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.DataTemplate

    It accepts a Microsoft.Maui.Controls.DataTemplate value.

    ValueMemberPath

    Gets or sets path of the value data member in the ItemsSource.

    Declaration
    public string ValueMemberPath { get; set; }
    Property Value
    Type Description
    System.String

    It accepts string values and its default value is null.

    Methods

    OnBindingContextChanged()

    Declaration
    protected override void OnBindingContextChanged()

    Events

    SelectionChanged

    Occurs when a segment is selected or deselected in the sunburst chart.

    Declaration
    public event EventHandler<SunburstSelectionChangedEventArgs> SelectionChanged
    Event Type
    Type
    System.EventHandler<SunburstSelectionChangedEventArgs>
    Remarks

    This event is triggered when a segment is selected or deselected. The event arguments provide information about which segment was affected and whether it was selected or deselected.

    Examples
    sunburstChart.SelectionChanged += OnSelectionChanged;
    
    private void OnSelectionChanged(object sender, SunburstSelectionChangedEventArgs args)
    {
        var newSegment = args.NewSegment;
        var oldSegment = args.OldSegment;
        bool isSelected = args.IsSelected;
        // Handle the selection change
    }

    SelectionChanging

    Occurs before a segment selection changes.

    Declaration
    public event EventHandler<SunburstSelectionChangingEventArgs> SelectionChanging
    Event Type
    Type
    System.EventHandler<SunburstSelectionChangingEventArgs>
    Remarks

    The SelectionChanging event is raised before a segment selection is applied. This event provides an opportunity to cancel the selection change by setting the Cancel property to true.

    This event provides information about both the previously selected segment and the new segment being selected.

    Examples
    sunburstChart.SelectionChanging += OnSelectionChanging;
    
    private void OnSelectionChanging(object sender, SunburstSelectionChangingEventArgs args)
    {
        var oldSegment = args.OldSegment;
        var newSegment = args.NewSegment;
        // Cancel selection change, if needed.
        args.Cancel = true;
    }

    Implements

    Microsoft.Maui.IContentView
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved