Class SunburstLegendSettings
Configures the legend settings of the Sunburst chart.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.Charts.dll
Syntax
public class SunburstLegendSettings : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
Remarks
The SunburstLegendSettings component provides options for displaying and customizing the legend of the Sunburst chart.
The legend helps users identify the categories represented in the chart and their corresponding colors. It can be positioned around the chart and can optionally support interactive visibility toggling.
Examples
<SfSunburstChart>
<SunburstLegendSettings Visible="true" Position="LegendPosition.Top" ToggleVisibility="true" />
</SfSunburstChart>
Constructors
SunburstLegendSettings()
Declaration
public SunburstLegendSettings()
Properties
AccessibilityDescription
Gets or sets the accessibility description for the legend.
Declaration
[Parameter]
public string AccessibilityDescription { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string that provides additional descriptive text for the legend. The default value is Empty. |
Remarks
This property improves accessibility by supplying descriptive information that can be announced by assistive technologies when the legend is focused.
Use this property to provide additional context about the legend and its purpose.
Examples
<SfSunburstChart>
<SunburstLegendSettings AccessibilityDescription="Chart legend" />
</SfSunburstChart>
AccessibilityRole
Gets or sets the accessibility role of the legend.
Declaration
[Parameter]
public string AccessibilityRole { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string that defines the semantic role of the legend for assistive technologies. The default value is Empty. |
Remarks
This property specifies the ARIA role applied to the legend, helping assistive technologies interpret its purpose and behavior.
Examples
<SfSunburstChart>
<SunburstLegendSettings AccessibilityRole="region" />
</SfSunburstChart>
Background
Gets or sets the background color of the legend.
Declaration
[Parameter]
public string Background { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string that specifies the background color of the legend.
The default value is |
Remarks
This property controls the background appearance of the legend.
The color can be specified using standard CSS color formats, such as named colors, hexadecimal values, RGB values, and RGBA values.
Examples
<SfSunburstChart>
<SunburstLegendSettings Visible="true" Background="#F5F5F5" />
</SfSunburstChart>
<SfSunburstChart>
<SunburstLegendSettings Visible="true" Background="lightblue" />
</SfSunburstChart>
Focusable
Gets or sets a value indicating whether the legend can receive keyboard focus.
Declaration
[Parameter]
public bool Focusable { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | true if the legend is focusable; otherwise, false. The default value is true. |
Remarks
Enabling this property allows keyboard users to navigate to the legend, improving accessibility and keyboard interaction support.
Examples
<SfSunburstChart>
<SunburstLegendSettings Focusable="true" />
</SfSunburstChart>
ItemPadding
Gets or sets the padding between legend items.
Declaration
[Parameter]
public double ItemPadding { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value that specifies the space, in pixels,
between adjacent legend items. The default value is |
Remarks
This property controls the spacing between legend items displayed in the Sunburst chart.
Increasing the value creates more space between items, while decreasing the value places them closer together.
Examples
<SfSunburstChart>
<SunburstLegendSettings Visible="true" ItemPadding="15" />
</SfSunburstChart>
Opacity
Gets or sets the opacity of the legend.
Declaration
[Parameter]
public double Opacity { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value between |
Remarks
This property controls the transparency of the legend.
A value of 0 makes the legend completely transparent, while a value
of 1 makes it fully opaque. Values between 0 and 1
produce varying levels of transparency.
Examples
<SfSunburstChart>
<SunburstLegendSettings Opacity="0.8" />
</SfSunburstChart>
Position
Gets or sets the position of the legend.
Declaration
[Parameter]
public SunburstLegendPosition Position { get; set; }
Property Value
| Type | Description |
|---|---|
| SunburstLegendPosition | A SunburstLegendPosition value that specifies the legend position. The default value is Bottom. |
Remarks
This property determines where the legend is rendered relative to the Sunburst chart.
Examples
<SfSunburstChart>
<SunburstLegendSettings Position="SunburstLegendPosition.Top" />
</SfSunburstChart>
ShapeHeight
Gets or sets the height of the legend shape.
Declaration
[Parameter]
public double ShapeHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value that specifies the height of the legend marker.
The default value is |
Remarks
This property determines the vertical size of the shape displayed alongside each legend item.
Increasing the value enlarges the legend marker, while decreasing the value reduces its height.
Examples
<SfSunburstChart>
<SunburstLegendSettings ShapeHeight="10" />
</SfSunburstChart>
ShapeWidth
Gets or sets the width of the legend shape.
Declaration
[Parameter]
public double ShapeWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double value that specifies the width of the legend marker.
The default value is |
Remarks
This property determines the horizontal size of the shape displayed alongside each legend item.
Increasing the value enlarges the legend marker, while decreasing the value reduces its width.
Examples
<SfSunburstChart>
<SunburstLegendSettings ShapeWidth="10" />
</SfSunburstChart>
ToggleVisibility
Gets or sets a value indicating whether legend items can be used to toggle the visibility of corresponding Sunburst chart segments.
Declaration
[Parameter]
public bool ToggleVisibility { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | true to allow toggling segment visibility through legend interaction; otherwise, false. The default value is true. |
Remarks
When enabled, users can click or tap legend items to show or hide the associated segment groups in the Sunburst chart.
Examples
<SfSunburstChart>
<SunburstLegendSettings Visible="true" ToggleVisibility="true" />
</SfSunburstChart>
Visible
Gets or sets a value indicating whether the legend is displayed.
Declaration
[Parameter]
public bool Visible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | true to display the legend; otherwise, false. The default value is false. |
Remarks
When enabled, the legend is rendered to help users identify the categories represented in the Sunburst chart.
The legend displays category information and the corresponding colors used to render the chart segments.
Examples
<SfSunburstChart>
<SunburstLegendSettings Visible="true" />
</SfSunburstChart>