Class VerticalLineAnnotation
This class is used to add a vertical line annotation to the SfCartesianChart. An instance of this class needs to be added to the Annotations collection.
Inherited Members
Namespace: Syncfusion.Maui.Toolkit.Charts
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class VerticalLineAnnotation : LineAnnotation, IThemeElement
Remarks
VerticalLineAnnotation is used to draw a vertical line across the chart area.
Examples
<chart:SfCartesianChart.Annotations>
<chart:VerticalLineAnnotation X1="3">
</chart:VerticalLineAnnotation>
</chart:SfCartesianChart.Annotations>
Constructors
VerticalLineAnnotation()
Declaration
public VerticalLineAnnotation()
Fields
AxisLabelStyleProperty
Identifies the AxisLabelStyle bindable property.
Declaration
public static readonly BindableProperty AxisLabelStyleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The AxisLabelStyle property allows customization of the axis label in the VerticalLineAnnotation.
ShowAxisLabelProperty
Identifies the ShowAxisLabel bindable property.
Declaration
public static readonly BindableProperty ShowAxisLabelProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The ShowAxisLabel property determines whether the axis label is displayed for the VerticalLineAnnotation.
Properties
AxisLabelStyle
Gets or sets the customized style for the annotation axis label.
Declaration
public ChartLabelStyle AxisLabelStyle { get; set; }
Property Value
Type | Description |
---|---|
ChartLabelStyle | This property takes the ChartLabelStyle as its value. |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SfCartesianChart.Annotations>
<chart:VerticalLineAnnotation X1="1">
<chart:VerticalLineAnnotation.AxisLabelStyle>
<chart:ChartLabelStyle Background="Yellow"/>
</chart:VerticalLineAnnotation.AxisLabelStyle>
</chart:VerticalLineAnnotation>
</chart:SfCartesianChart.Annotations>
</chart:SfCartesianChart>
ShowAxisLabel
Gets or sets a value indicating whether to enable or disable the display of the annotation label on the axis.
Declaration
public bool ShowAxisLabel { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | This property takes the |
Examples
<chart:SfCartesianChart>
<!-- ... Eliminated for simplicity-->
<chart:SfCartesianChart.Annotations>
<chart:VerticalLineAnnotation X1="1" ShowAxisLabel="True"/>
</chart:SfCartesianChart.Annotations>
</chart:SfCartesianChart>
Methods
Draw(ICanvas, RectF)
Draws the annotation of the chart.
Declaration
protected override void Draw(ICanvas canvas, RectF dirtyRect)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Graphics.ICanvas | canvas | |
Microsoft.Maui.Graphics.RectF | dirtyRect |