Class TextAnnotation
This class is used to add a text annotation in SfChart. An instance of this class need to be added to ChartAnnotations collection.
Inherited Members
Namespace: Syncfusion.SfChart.XForms
Assembly: Syncfusion.SfChart.XForms.dll
Syntax
public class TextAnnotation : ChartAnnotation, IThemeElement
Remarks
TextAnnotations are used to add simple text in specific points over the chart area.
Examples
SfChart chart = new SfChart();
TextAnnotation text = new TextAnnotation();
chart.ChartAnnotations.Add(text);
Constructors
TextAnnotation()
Declaration
public TextAnnotation()
Fields
LabelStyleProperty
Gets the customized style for the annotation text by using the ChartAnnotationLabelStyle. This is a bindable property.
Declaration
public static readonly BindableProperty LabelStyleProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TextProperty
Gets or sets the text to be displayed on the annotation. This is a bindable property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
LabelStyle
Gets or sets the customized style for the annotation text by using the ChartAnnotationLabelStyle. This is a bindable property.
Declaration
public ChartAnnotationLabelStyle LabelStyle { get; set; }
Property Value
Type | Description |
---|---|
ChartAnnotationLabelStyle | This property takes the ChartAnnotationLabelStyle as its value. |
Text
Gets or sets the text to be displayed on the annotation. This is a bindable property.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | This property takes the string value. |
Methods
OnBindingContextChanged()
Override this method to execute an action when the BindingContext changes.
Declaration
protected override void OnBindingContextChanged()
OnParentSet()
Declaration
protected override void OnParentSet()