menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class ShapeAnnotation

    Inheritance
    System.Object
    ChartAnnotation
    ShapeAnnotation
    EllipseAnnotation
    LineAnnotation
    RectangleAnnotation
    Inherited Members
    ChartAnnotation.CoordinateUnit
    ChartAnnotation.GetView()
    ChartAnnotation.MouseDown(CGPoint, NSEvent)
    ChartAnnotation.MouseEntered(CGPoint, NSEvent)
    ChartAnnotation.MouseExited(CGPoint, NSEvent)
    ChartAnnotation.MouseMoved(CGPoint, NSEvent)
    ChartAnnotation.MouseUp(CGPoint, NSEvent)
    ChartAnnotation.Visible
    ChartAnnotation.X1
    ChartAnnotation.XAxisName
    ChartAnnotation.Y1
    ChartAnnotation.YAxisName
    Namespace: Syncfusion.MacOS.Charts.SfChart
    Assembly: Syncfusion.SfChart.XForms.macOS.dll
    Syntax
    public abstract class ShapeAnnotation : ChartAnnotation

    Constructors

    ShapeAnnotation()

    Declaration
    public ShapeAnnotation()

    Properties

    FillColor

    Gets or sets the Color that indicates color of the annotation.

    Declaration
    public NSColor FillColor { get; set; }
    Property Value
    Type Description
    AppKit.NSColor

    The color of the fill.

    LabelStyle

    Gets the customized style for the annotation text using ChartAnnotationLabelStyle.

    Declaration
    public ChartAnnotationLabelStyle LabelStyle { get; }
    Property Value
    Type Description
    ChartAnnotationLabelStyle

    The label style.

    StrokeColor

    Gets or sets the Color that indicates stroke color of the annotation.

    Declaration
    public NSColor StrokeColor { get; set; }
    Property Value
    Type Description
    AppKit.NSColor

    The stroke.

    StrokeDashArray

    Gets or sets the NSArray that represents dashes for annotation stroke.

    Declaration
    public NSArray StrokeDashArray { get; set; }
    Property Value
    Type Description
    Foundation.NSArray

    The stroke dash array.

    StrokeWidth

    Gets or sets the float value that represents stroke width of the annotation.

    Declaration
    public float StrokeWidth { get; set; }
    Property Value
    Type Description
    System.Single

    The width of the stroke.

    Text

    Gets or sets the string value that represents text to be displayed on the annotation.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    The annotation text.

    X2

    Gets or sets the date time or double that represents x2 position of annotation.

    Declaration
    public object X2 { get; set; }
    Property Value
    Type Description
    System.Object

    The x2.

    Y2

    Gets or sets the double that represents y2 position of annotation.

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

    The y2.

    Methods

    Draw(CGContext)

    Method used to draw annotation in chart area.

    Declaration
    protected override void Draw(CGContext context)
    Parameters
    Type Name Description
    CoreGraphics.CGContext context

    The context.

    Overrides
    ChartAnnotation.Draw(CGContext)

    DrawLabel(CGContext, String, Double, Double)

    Draws the annotation label.

    Declaration
    protected virtual void DrawLabel(CGContext context, string label, double pointX, double pointY)
    Parameters
    Type Name Description
    CoreGraphics.CGContext context

    The context.

    System.String label

    The label.

    System.Double pointX

    The x coordinate.

    System.Double pointY

    The y coordinate.

    DrawLabelBackground(CGContext, RectangleF)

    Draws the annotation label background.

    Declaration
    protected virtual void DrawLabelBackground(CGContext context, RectangleF rect)
    Parameters
    Type Name Description
    CoreGraphics.CGContext context

    The context.

    System.Drawing.RectangleF rect

    The rectangle.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved