menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class HorizontalLineAnnotation - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    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.

    Inheritance
    System.Object
    ChartAnnotation
    ShapeAnnotation
    LineAnnotation
    HorizontalLineAnnotation
    Inherited Members
    ChartAnnotation.Chart
    ChartAnnotation.CoordinateUnit
    ChartAnnotation.CoordinateUnitProperty
    ChartAnnotation.IsVisible
    ChartAnnotation.IsVisibleProperty
    ChartAnnotation.OnTouchDown(Single, Single)
    ChartAnnotation.OnTouchMove(Single, Single)
    ChartAnnotation.OnTouchUp(Single, Single)
    ChartAnnotation.X1
    ChartAnnotation.X1Property
    ChartAnnotation.XAxisName
    ChartAnnotation.XAxisNameProperty
    ChartAnnotation.Y1
    ChartAnnotation.Y1Property
    ChartAnnotation.YAxisName
    ChartAnnotation.YAxisNameProperty
    LineAnnotation.LineCap
    LineAnnotation.LineCapProperty
    ShapeAnnotation.FillColor
    ShapeAnnotation.FillColorProperty
    ShapeAnnotation.LabelStyle
    ShapeAnnotation.LabelStyleProperty
    ShapeAnnotation.StrokeColor
    ShapeAnnotation.StrokeColorProperty
    ShapeAnnotation.StrokeDashArray
    ShapeAnnotation.StrokeDashArrayProperty
    ShapeAnnotation.StrokeWidth
    ShapeAnnotation.StrokeWidthProperty
    ShapeAnnotation.Text
    ShapeAnnotation.TextProperty
    ShapeAnnotation.X2
    ShapeAnnotation.X2Property
    ShapeAnnotation.Y2
    ShapeAnnotation.Y2Property
    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
    ShapeAnnotation.OnBindingContextChanged()

    OnParentSet()

    Declaration
    protected override void OnParentSet()
    Overrides
    ShapeAnnotation.OnParentSet()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved