Class CircularGaugeLegendSettings
Defines the options for customizing the legend of the circular gauge.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.CircularGauge
Assembly: Syncfusion.Blazor.dll
Syntax
public class CircularGaugeLegendSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
CircularGaugeLegendSettings()
Declaration
public CircularGaugeLegendSettings()
Properties
Alignment
Gets or sets the alignment of the legend in the circular gauge.
Declaration
[Parameter]
public Alignment Alignment { get; set; }
Property Value
| Type | Description |
|---|---|
| Alignment | An Alignment enum specifying the legend's horizontal alignment. |
Remarks
This property allows you to position the legend at the left, center, or right within the gauge.
Background
Gets or sets the background color of the legend in the circular gauge.
Declaration
[Parameter]
public string Background { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string that defines the color used for the legend's background. The default is "transparent". |
Remarks
Adjust the legend's background to match your application theme or design requirements.
ChildContent
Gets or sets the content of the UI element.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | A RenderFragment that represents the content of the legend UI element. |
Remarks
Use this property to define custom content for the legend section in the circular gauge component.
Height
Gets or sets the height of the legend in the circular gauge.
Declaration
[Parameter]
public string Height { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string specifying the height of the legend area. |
Remarks
Use this property to control the size of the legend to fit within the layout of the gauge.
Opacity
Gets or sets the opacity of the legend.
Declaration
[Parameter]
public double Opacity { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double representing the degree of transparency for the legend, ranging from 0 (fully transparent) to 1 (fully opaque). The default is 1. |
Remarks
Utilize this property to create visual effects through transparency.
Padding
Gets or sets the options to customize the padding between legend items.
Declaration
[Parameter]
public double Padding { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double defining the spacing in pixels between legend items. The default is 8. |
Remarks
Modify padding to improve the visual separation of legend items.
Position
Gets or sets the position of the legend in the circular gauge.
Declaration
[Parameter]
public LegendPosition Position { get; set; }
Property Value
| Type | Description |
|---|---|
| LegendPosition | A LegendPosition enum value that denotes the position of the legend. |
Remarks
Choose between predefined positions like top, bottom, and auto-placement to optimize layout.
Shape
Gets or sets the shape of the legend in the circular gauge.
Declaration
[Parameter]
public GaugeShape Shape { get; set; }
Property Value
| Type | Description |
|---|---|
| GaugeShape | A GaugeShape enum that indicates the shape type for symbols in the legend. |
Remarks
Define the appearance of legend symbols using various shapes, enhancing visual consistency.
ShapeHeight
Gets or sets the height of the legend shape in the circular gauge.
Declaration
[Parameter]
public double ShapeHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double specifying the height of legend symbols. The default is 10. |
Remarks
Adjust symbol height to align with overall design and visibility requirements.
ShapePadding
Gets or sets the padding for the legend shape in the circular gauge.
Declaration
[Parameter]
public double ShapePadding { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double defining the padding around legend symbols. The default is 5. |
Remarks
Control the spacing around legend symbols to enhance layout clarity.
ShapeWidth
Gets or sets the width of the legend shape in the circular gauge.
Declaration
[Parameter]
public double ShapeWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| double | A double representing the width of legend symbols. The default is 10. |
Remarks
Adjust the width of legend symbols to maintain balance and proportion within the gauge.
ToggleVisibility
Gets or sets a value indicating whether to enable or disable the visibility of ranges based on the legend's visibility.
Declaration
[Parameter]
public bool ToggleVisibility { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool flag that indicates whether range visibility toggles with legend visibility. The default is true. |
Remarks
Use this property to synchronize range visibility with legend toggling for more interactive visualizations.
Visible
Gets or sets a value indicating whether to enable or disable the visibility of the legend in the circular gauge.
Declaration
[Parameter]
public bool Visible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool value indicating whether the legend is visible. Default is false. |
Remarks
Set this property to true to display the legend, allowing users to see descriptions and mappings for the gauge's visual elements.
Width
Gets or sets the width of the legend in the circular gauge.
Declaration
[Parameter]
public string Width { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string specifying the width of the legend area. |
Remarks
Use this property to define the width of the legend, ensuring it fits correctly within the gauge's layout.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
Dispose(bool)
Disposes the property values during the destroy of the component that is hold up for the execution of the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
OnInitializedAsync()
OnInitializedAsync method is called when the component has received its initial parameters.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | Task representing the asynchronous operation. |
Overrides
OnParametersSetAsync()
OnParametersSetAsync is a lifecycle method that is invoked when the component has received parameters, and the incoming values have been assigned to the properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | Task representing the asynchronous operation. |