Class ChartAnnotationLabelStyle
Represents properties for customizing annotation labels.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class ChartAnnotationLabelStyle : ChartLabelStyle, ITextElement, IThemeElement
Remarks
This class provides options to customize the appearance of annotation labels.
HorizontalAlignment - Specifies the horizontal alignment of the annotation label. Refer to the HorizontalTextAlignment property for details.
VerticalAlignment - Specifies the vertical alignment of the annotation label. Refer to the VerticalTextAlignment property for details.
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SfCartesianChart.Annotations>
<chart:TextAnnotation X1="3" Y1="30" Text="TextAnnotation">
<chart:TextAnnotation.LabelStyle>
<chart:ChartAnnotationLabelStyle VerticalTextAlignment="Start"/>
</chart:TextAnnotation.LabelStyle>
</chart:TextAnnotation>
</chart:SfCartesianChart.Annotations>
</chart:SfCartesianChart>
Constructors
ChartAnnotationLabelStyle()
Declaration
public ChartAnnotationLabelStyle()
Fields
HorizontalTextAlignmentProperty
Identifies the HorizontalTextAlignment bindable property.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for HorizontalTextAlignment bindable property. |
VerticalTextAlignmentProperty
Identifies the VerticalTextAlignment bindable property.
Declaration
public static readonly BindableProperty VerticalTextAlignmentProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for VerticalTextAlignment bindable property. |
Properties
HorizontalTextAlignment
Gets or sets the horizontal text alignment of chart annotation.
Declaration
public ChartLabelAlignment HorizontalTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
ChartLabelAlignment | This property takes the ChartLabelAlignment as its value and its default value is Center. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SfCartesianChart.Annotations>
<chart:TextAnnotation X1="3" Y1="30" Text="TextAnnotation">
<chart:HorizontalLineAnnotation.LabelStyle>
<chart:ChartAnnotationLabelStyle HorizontalTextAlignment="Start"/>
</chart:HorizontalLineAnnotation.LabelStyle>
</chart:HorizontalLineAnnotation>
</chart:SfCartesianChart.Annotations>
</chart:SfCartesianChart>
VerticalTextAlignment
Gets or sets the vertical text alignment of chart annotation.
Declaration
public ChartLabelAlignment VerticalTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
ChartLabelAlignment | This property takes the ChartLabelAlignment as its value and its default value is Center. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SfCartesianChart.Annotations>
<chart:TextAnnotation X1="3" Y1="30" Text="TextAnnotation">
<chart:HorizontalLineAnnotation.LabelStyle>
<chart:ChartAnnotationLabelStyle VerticalTextAlignment="Start"/>
</chart:HorizontalLineAnnotation.LabelStyle>
</chart:HorizontalLineAnnotation>
</chart:SfCartesianChart.Annotations>
</chart:SfCartesianChart>