Class ViewAnnotation
This class is used to add an view 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 ViewAnnotation : ChartAnnotation, IThemeElement
Remarks
ViewAnnotation is used to add any custom shape or custom view over the chart area.
Examples
SfChart chart = new SfChart();
ViewAnnotation viewAnnotation = new ViewAnnotation();
chart.ChartAnnotations.Add(viewAnnotation);
Constructors
ViewAnnotation()
Declaration
public ViewAnnotation()
Fields
HorizontalAlignmentProperty
Gets or sets the horizontal alignment of the view. This is a bindable property.
Declaration
public static readonly BindableProperty HorizontalAlignmentProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
VerticalAlignmentProperty
Gets or sets the vertical alignment of the view. This is a bindable property.
Declaration
public static readonly BindableProperty VerticalAlignmentProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ViewProperty
Gets or sets the View that represents custom view for annotation. This is a bindable property.
Declaration
public static readonly BindableProperty ViewProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
HorizontalAlignment
Gets or sets the horizontal alignment of the view. This is a bindable property.
Declaration
public ChartAnnotationAlignment HorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
ChartAnnotationAlignment | This property takes the HorizontalAlignment as its value. |
VerticalAlignment
Gets or sets the vertical alignment of the view. This is a bindable property.
Declaration
public ChartAnnotationAlignment VerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
ChartAnnotationAlignment | This property takes the VerticalAlignment as its value. |
View
Gets or sets the View that represents custom view for annotation. This is a bindable property.
Declaration
public View View { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.View | This property takes the View value. |
Methods
OnBindingContextChanged()
Override this method to execute an action when the BindingContext changes.
Declaration
protected override void OnBindingContextChanged()