Class ChartAnnotationLabelStyle
Represents properties for customizing annotation labels.
Inherited Members
Namespace: Syncfusion.Maui.Toolkit.Charts
Assembly: Syncfusion.Maui.Toolkit.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()
Initializes a new instance of the ChartAnnotationLabelStyle.
Declaration
public ChartAnnotationLabelStyle()
Fields
HorizontalTextAlignmentProperty
Identifies the HorizontalTextAlignment bindable property.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the HorizontalTextAlignment bindable property determines the horizontal text alignment of the chart annotation.
VerticalTextAlignmentProperty
Identifies the VerticalTextAlignment bindable property.
Declaration
public static readonly BindableProperty VerticalTextAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the VerticalTextAlignment bindable property determines the vertical text alignment of the chart annotation.
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>