Appearance in .NET MAUI Sunburst Chart

19 Dec 20233 minutes to read

The appearance of the SfSunburstChart can be customized by using Angle, Radius, Inner radius and Stroke, which allows for enriching the application.

Angle

The start angle and end angle of the sunburst chart can be adjusted by using the StartAngle and EndAngle properties.

<sunburst:SfSunburstChart ItemsSource="{Binding DataSource}" 
                            StartAngle="180" 
                            EndAngle="360"
                            ValueMemberPath="EmployeesCount">
    . . .
</sunburst:SfSunburstChart>
SfSunburstChart sunburst = new SfSunburstChart();
. . .
sunburst.StartAngle = 180;
sunburst.EndAngle = 360;
. . .

Angle customization in MAUI Sunburst Chart.

Radius

The sunburst chart allows you to customize the radius by using the Radius property. The default value of this property is 0.9, and the value ranges from 0 to 1.

<sunburst:SfSunburstChart ItemsSource="{Binding DataSource}" 
                            Radius="0.7"
                            ValueMemberPath="EmployeesCount">
    . . .
</sunburst:SfSunburstChart>
SfSunburstChart sunburst = new SfSunburstChart();
. . .
sunburst.Radius = 0.7;
. . .

Radius in MAUI Sunburst Chart.

Inner radius

The sunburst chart allows you to customize the inner radius using the InnerRadius property. The default value of this property is 0.25, and the value ranges from 0 to 1.

<sunburst:SfSunburstChart ItemsSource="{Binding DataSource}" 
                            InnerRadius="0.4"
                            ValueMemberPath="EmployeesCount">
    . . .
</sunburst:SfSunburstChart>
SfSunburstChart sunburst = new SfSunburstChart();
. . .
sunburst.InnerRadius = 0.4;
. . .

Inner radius in MAUI Sunburst Chart.

Stroke

Stroke color and stroke width of the sunburst chart can be customized using Stroke and StrokeWidth properties respectively.

<sunburst:SfSunburstChart ItemsSource="{Binding DataSource}" 
                            Stroke="Black" 
                            StrokeWidth="2"
                            ValueMemberPath="EmployeesCount">
    . . .
</sunburst:SfSunburstChart>
SfSunburstChart sunburst = new SfSunburstChart();
. . .
sunburst.Stroke = Colors.Black;
sunburst.StrokeWidth = 2;
. . .

Stroke and stroke width in MAUI Sunburst Chart.