Class LineAnnotation
This class is used to add a line annotation to the SfCartesianChart. An instance of this class needs to be added to the Annotations collection.
Inheritance
System.Object
LineAnnotation
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class LineAnnotation : ShapeAnnotation, IThemeElement
Remarks
LineAnnotation is used to draw a line across the chart area.
Examples
<chart:SfCartesianChart.Annotations>
<chart:LineAnnotation X1="1" Y1="10" X2="4" Y2="20" Text="Line" CoordinateUnit="Axis">
</chart:LineAnnotation>
</chart:SfCartesianChart.Annotations>
Constructors
LineAnnotation()
Declaration
public LineAnnotation()
Fields
LineCapProperty
Identifies the LineCap bindable property.
Declaration
public static readonly BindableProperty LineCapProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for LineCap bindable property. |
Properties
LineCap
Represents the type of cap for line annotation. Gets or sets the line cap value for the line annotation.
Declaration
public ChartLineCap LineCap { get; set; }
Property Value
Type | Description |
---|---|
ChartLineCap | This property takes the ChartLineCap as its value and its default value is None. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SfCartesianChart.Annotations>
<chart:LineAnnotation X1="0" Y1="10" X2="4" Y2="50" LineCap="Arrow"/>
</chart:SfCartesianChart.Annotations>
</chart:SfCartesianChart>
Methods
Draw(ICanvas, RectF)
Declaration
protected override void Draw(ICanvas canvas, RectF dirtyRect)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Graphics.ICanvas | canvas | |
Microsoft.Maui.Graphics.RectF | dirtyRect |