Class HorizontalLineAnnotation
This class is used to add a horizontal line 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 HorizontalLineAnnotation : LineAnnotation, IThemeElement
Remarks
HorizontalLineAnnotation is used to add a horizontal line across the chart area.
Examples
SfChart chart = new SfChart();
HorizontalLineAnnotation horizontalLine = new HorizontalLineAnnotation();
chart.ChartAnnotations.Add(horizontalLine);
Constructors
HorizontalLineAnnotation()
Initializes a new instance of the HorizontalLineAnnotation class.
Declaration
public HorizontalLineAnnotation()
Fields
AxisLabelStyleProperty
Gets the customized style for the annotation axis label by using the ChartLabelStyle. This is a bindable property.
Declaration
public static readonly BindableProperty AxisLabelStyleProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ShowAxisLabelProperty
Gets or sets a value indicating whether axis label is enabled in the annotation. This is a bindable property.
Declaration
public static readonly BindableProperty ShowAxisLabelProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
AxisLabelStyle
Gets or sets the customized style for the annotation axis label by using the ChartLabelStyle and ChartAxisLabelStyle. This is a bindable property.
Declaration
public ChartLabelStyle AxisLabelStyle { get; set; }
Property Value
Type | Description |
---|---|
ChartLabelStyle | This property takes the ChartLabelStyle and ChartAxisLabelStyle as its value. |
Remarks
AxisLabelStyle in vertical line annotation is customized into ChartLabelStyle and ChartAxisLabelStyle style .
ShowAxisLabel
Gets or sets a value indicating whether axis label is enabled in the annotation. This is a bindable property.
Declaration
public bool ShowAxisLabel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | This property takes the bool value. |
Methods
OnBindingContextChanged()
Override this method to execute an action when the BindingContext changes.
Declaration
protected override void OnBindingContextChanged()
Overrides
OnParentSet()
Declaration
protected override void OnParentSet()