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.Charts
Assembly: Syncfusion.Maui.Charts.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" Y1="10" Y2="30">
</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 | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for AxisLabelStyle bindable property. |
ShowAxisLabelProperty
Identifies the ShowAxisLabel bindable property.
Declaration
public static readonly BindableProperty ShowAxisLabelProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.BindableProperty | The identifier for ShowAxisLabel bindable property. |
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" Y1="10" Y2="20">
<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" Y1="10" Y2="20" ShowAxisLabel="True"/>
</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 |
Overrides
OnBindingContextChanged()
Declaration
protected override void OnBindingContextChanged()
Overrides
OnParentSet()
Declaration
protected override void OnParentSet()