menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class EllipseAnnotation - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class EllipseAnnotation

    This class is used to add an ellipse annotation in the SfCartesianChart. An instance of this class needs to be added to the Annotations collection.

    Inheritance
    System.Object
    ChartAnnotation
    ShapeAnnotation
    EllipseAnnotation
    Inherited Members
    ChartAnnotation.CoordinateUnit
    ChartAnnotation.CoordinateUnitProperty
    ChartAnnotation.IsVisible
    ChartAnnotation.IsVisibleProperty
    ChartAnnotation.X1
    ChartAnnotation.X1Property
    ChartAnnotation.XAxisName
    ChartAnnotation.XAxisNameProperty
    ChartAnnotation.Y1
    ChartAnnotation.Y1Property
    ChartAnnotation.YAxisName
    ChartAnnotation.YAxisNameProperty
    ShapeAnnotation.Fill
    ShapeAnnotation.FillProperty
    ShapeAnnotation.LabelStyle
    ShapeAnnotation.LabelStyleProperty
    ShapeAnnotation.OnBindingContextChanged()
    ShapeAnnotation.OnParentSet()
    ShapeAnnotation.Stroke
    ShapeAnnotation.StrokeDashArray
    ShapeAnnotation.StrokeDashArrayProperty
    ShapeAnnotation.StrokeProperty
    ShapeAnnotation.StrokeWidth
    ShapeAnnotation.StrokeWidthProperty
    ShapeAnnotation.Text
    ShapeAnnotation.TextProperty
    ShapeAnnotation.X2
    ShapeAnnotation.X2Property
    ShapeAnnotation.Y2
    ShapeAnnotation.Y2Property
    Namespace: Syncfusion.Maui.Charts
    Assembly: Syncfusion.Maui.Charts.dll
    Syntax
    public class EllipseAnnotation : ShapeAnnotation, IThemeElement
    Remarks

    EllipseAnnotation is used to draw a circle or an ellipse over the chart area.

    Examples
    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart.Annotations>
      <chart:EllipseAnnotation X1="3" Y1="10" X2="4" Y2="15" Text="Ellipse">
      </chart:EllipseAnnotation>
    </chart:SfCartesianChart.Annotations>  
     SfCartesianChart chart = new SfCartesianChart();
     var ellipse = new EllipseAnnotation()
     {
       X1 = 3,
       Y1 = 10,
       X2 = 4,
       Y2 = 15,
       Text = "Ellipse",
     };
    
    chart.Annotations.Add(ellipse);

    Constructors

    EllipseAnnotation()

    Declaration
    public EllipseAnnotation()

    Fields

    HeightProperty

    Identifies the Height bindable property.

    Declaration
    public static readonly BindableProperty HeightProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Height bindable property.

    HorizontalAlignmentProperty

    Identifies the HorizontalAlignment bindable property.

    Declaration
    public static readonly BindableProperty HorizontalAlignmentProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for HorizontalAlignment bindable property.

    VerticalAlignmentProperty

    Identifies the VerticalAlignment bindable property.

    Declaration
    public static readonly BindableProperty VerticalAlignmentProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for VerticalAlignment bindable property.

    WidthProperty

    Identifies the Width bindable property.

    Declaration
    public static readonly BindableProperty WidthProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Width bindable property.

    Properties

    Height

    Gets or sets the height value for the ellipse annotation.

    Declaration
    public double Height { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the double as its value and its default value is 10.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
        <chart:SfCartesianChart.Annotations>
             <chart:EllipseAnnotation X1="3" Y1="10" Width="20" Height="20"/>
        </chart:SfCartesianChart.Annotations>  
    
        </chart:SfCartesianChart>
     SfCartesianChart chart = new SfCartesianChart();     
    
        // Eliminated for simplicity
     var ellipse = new EllipseAnnotation()
     {
       X1 = 3,
       Y1 = 10,
       Height = 20,
       Width = 20,
     };
    
    chart.Annotations.Add(ellipse);

    HorizontalAlignment

    Gets or sets the horizontal alignment of the ellipse annotation.

    Declaration
    public ChartAlignment HorizontalAlignment { get; set; }
    Property Value
    Type Description
    ChartAlignment

    This property takes the ChartAlignment as its value and its default value is Center.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
        <chart:SfCartesianChart.Annotations>
             <chart:EllipseAnnotation X1="3" Y1="10" Width="20" Height="20" HorizontalAlignment="Start"/>
        </chart:SfCartesianChart.Annotations>  
    
        </chart:SfCartesianChart>
     SfCartesianChart chart = new SfCartesianChart();     
    
        // Eliminated for simplicity
     var ellipse = new EllipseAnnotation()
     {
       X1 = 3,
       Y1 = 10,
       Height = 20,
       Width = 20,
       HorizontalAlignment = ChartAlignment.Start,
     };
    
    chart.Annotations.Add(ellipse);

    VerticalAlignment

    Gets or sets the vertical alignment of the ellipse annotation.

    Declaration
    public ChartAlignment VerticalAlignment { get; set; }
    Property Value
    Type Description
    ChartAlignment

    This property takes the ChartAlignment as its value. Its default value is Center.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
        <chart:SfCartesianChart.Annotations>
             <chart:EllipseAnnotation X1="3" Y1="10" Width="20" Height="20" VerticalAlignment="Start"/>
        </chart:SfCartesianChart.Annotations>  
    
        </chart:SfCartesianChart>
     SfCartesianChart chart = new SfCartesianChart();     
    
        // Eliminated for simplicity
     var ellipse = new EllipseAnnotation()
     {
       X1 = 3,
       Y1 = 10,
       Height = 20,
       Width = 20,
       VerticalAlignment = ChartAlignment.Start,
     };
    
    chart.Annotations.Add(ellipse);

    Width

    Gets or sets the width value for the ellipse annotation.

    Declaration
    public double Width { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the double as its value and its default value is 10.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
        <chart:SfCartesianChart.Annotations>
             <chart:EllipseAnnotation X1="3" Y1="10" Height="20" Width="20"/>
        </chart:SfCartesianChart.Annotations>  
    
        </chart:SfCartesianChart>
     SfCartesianChart chart = new SfCartesianChart();     
    
        // Eliminated for simplicity
     var ellipse = new EllipseAnnotation()
     {
       X1 = 3,
       Y1 = 10,
       Width = 20,
       Height = 20,
     };
    
    chart.Annotations.Add(ellipse);

    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
    ShapeAnnotation.Draw(ICanvas, RectF)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved