Class LinearGaugeAnnotation
Defines the annotation element for an axis in linear gauge component.
Inheritance
Namespace: Syncfusion.Blazor.LinearGauge
Assembly: Syncfusion.Blazor.dll
Syntax
public class LinearGaugeAnnotation : OwningComponentBase
Constructors
LinearGaugeAnnotation()
Declaration
public LinearGaugeAnnotation()
Properties
AxisIndex
Gets or sets the index value of the axis of the linear gauge.
Declaration
public int AxisIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer representing the axis index. |
Remarks
This property determines which axis the annotation is associated with in a multiple-axes scenario.
AxisValue
Gets or sets the value on the axis where the annotation will be rendered.
Declaration
public double AxisValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the axis value. Default is System.Double.NaN. |
Remarks
This property specifies the axis value that the annotation corresponds to.
ChildContent
Gets or sets the content of the UI element.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | A Microsoft.AspNetCore.Components.RenderFragment that represents the child content of the annotation. |
Remarks
It allows embedding custom elements or components within the annotation.
Content
Gets or sets the text content for the annotation.
Declaration
public string Content { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string containing the text to be displayed in the annotation. |
Remarks
Use this string property to set simple text content for the annotation if templates are not needed.
ContentTemplate
Gets or sets the template content for the annotation.
Declaration
public RenderFragment ContentTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | A Microsoft.AspNetCore.Components.RenderFragment representing the template content of the annotation. |
Remarks
This property is used to customize the display of annotation using templates.
HorizontalAlignment
Gets or sets the horizontal alignment of the annotation.
Declaration
public Placement HorizontalAlignment { get; set; }
Property Value
Remarks
This property controls how the annotation is horizontally aligned with respect to its defined position.
VerticalAlignment
Gets or sets the vertical alignment of the annotation.
Declaration
public Placement VerticalAlignment { get; set; }
Property Value
Remarks
This property determines the vertical alignment aspect of the annotation within the gauge.
X
Gets or sets the X-coordinate position for the annotation.
Declaration
public double X { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double that specifies the horizontal offset of the annotation from its default position. |
Remarks
This property allows positioning the annotation horizontally within the gauge.
Y
Gets or sets the Y-coordinate position for the annotation.
Declaration
public double Y { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double that specifies the vertical offset of the annotation from its default position. |
Remarks
This property allows positioning the annotation vertically within the gauge.
ZIndex
Gets or sets the Z-index of the annotation.
Declaration
public string ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the Z-index property for layering annotations. Default is "-1". |
Remarks
This property helps in handling the stacking order of the annotation with respect to other components.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
Dispose(Boolean)
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 |
---|---|---|
System.Boolean | disposing |
OnInitializedAsync()
OnInitializedAsync method is called when the component has received its initial parameters.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
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 |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
UpdateChildProperties(LinearGaugeAnnotationFont)
UpdateChildProperties is used to update the child properties.
Declaration
public void UpdateChildProperties(LinearGaugeAnnotationFont annotationValue)
Parameters
Type | Name | Description |
---|---|---|
LinearGaugeAnnotationFont | annotationValue | An instance of LinearGaugeAnnotationFont containing the font properties. |
Remarks
This method is used to programmatically update the font related properties of the annotation.