MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GaugeAnnotation

    Show / Hide Table of Contents

    Class GaugeAnnotation

    RadialAxis allows to add views such as text and image as an annotation to a specific point of interest in the radial gauge. GaugeAnnotation provides options to add any image, text or other views over a gauge with respect to angle or axis value. Display the current progress or pointer value inside the gauge using a text annotation.

    Inheritance
    System.Object
    GaugeAnnotation
    Namespace: Syncfusion.Maui.Gauges
    Assembly: Syncfusion.Maui.Gauges.dll
    Syntax
    public class GaugeAnnotation : BindableObject
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Annotations>
                    <gauge:GaugeAnnotation>
                        <gauge:GaugeAnnotation.Content>
                                <Label Text="Syncfusion"
                                           TextColor="Black" />
                        </gauge:GaugeAnnotation.Content>
                    </gauge:GaugeAnnotation>
                </gauge:RadialAxis.Annotations>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Constructors

    GaugeAnnotation()

    Declaration
    public GaugeAnnotation()

    Fields

    ContentProperty

    Identifies the Content bindable property.

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

    The identifier for Content bindable property.

    DirectionUnitProperty

    Identifies the DirectionUnit bindable property.

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

    The identifier for DirectionUnit bindable property.

    DirectionValueProperty

    Identifies the DirectionValue bindable property.

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

    The identifier for DirectionValue 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.

    PositionFactorProperty

    Identifies the PositionFactor bindable property.

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

    The identifier for PositionFactor 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.

    Properties

    Content

    Gets or sets the value that represents annotation's content.

    Declaration
    public View Content { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.View
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Annotations>
                    <gauge:GaugeAnnotation>
                        <gauge:GaugeAnnotation.Content>
                            <Label Text="Syncfusion"
                                           TextColor="Black" />
                        </gauge:GaugeAnnotation.Content>
                    </gauge:GaugeAnnotation>
                </gauge:RadialAxis.Annotations>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    DirectionUnit

    Gets or sets the value that indicates the direction of annotation calculated based on axis value or angle.

    Declaration
    public AnnotationDirection DirectionUnit { get; set; }
    Property Value
    Type Description
    AnnotationDirection

    One of the enumeration values that specifies the direction unit of annotation in the radial gauge. The default is Angle.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Annotations>
                    <gauge:GaugeAnnotation DirectionValue="90" PositionFactor="0.3" 
                                           DirectionUnit="AxisValue">
                        <gauge:GaugeAnnotation.Content>
                            <Label Text="Syncfusion"
                                           TextColor="Black" />
                        </gauge:GaugeAnnotation.Content>
                    </gauge:GaugeAnnotation>
                </gauge:RadialAxis.Annotations>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    DirectionValue

    Gets or sets the value to adjusts the annotation distance from center. You can specify value either in axis value or angle using the DirectionUnit property.

    Declaration
    public double DirectionValue { get; set; }
    Property Value
    Type Description
    System.Double
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Annotations>
                    <gauge:GaugeAnnotation DirectionValue="90" PositionFactor="0.3">
                        <gauge:GaugeAnnotation.Content>
                            <Label Text="Syncfusion"
                                           TextColor="Black" />
                        </gauge:GaugeAnnotation.Content>
                    </gauge:GaugeAnnotation>
                </gauge:RadialAxis.Annotations>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    HorizontalAlignment

    Gets or sets the value that indicates the horizontal alignment of annotation.

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

    The default is Center.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Annotations>
                    <gauge:GaugeAnnotation HorizontalAlignment="Start" >
                        <gauge:GaugeAnnotation.Content>
                            <Label Text="Syncfusion"
                                           TextColor="Black" />
                        </gauge:GaugeAnnotation.Content>
                    </gauge:GaugeAnnotation>
                </gauge:RadialAxis.Annotations>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    PositionFactor

    Gets or sets a value that specifies the position of annotation in radius factor. PositionFactor value of 0 is starting from the center and 1 is ending at the edge of the radius.

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

    PositionFactor value of 0 is starting from the center and 1 is ending at the edge of the radius. PositionFactor must be between 0 to 1.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Annotations>
                    <gauge:GaugeAnnotation DirectionValue="90" PositionFactor="0.5">
                        <gauge:GaugeAnnotation.Content>
                            <Label Text="Syncfusion"
                                           TextColor="Black" />
                        </gauge:GaugeAnnotation.Content>
                    </gauge:GaugeAnnotation>
                </gauge:RadialAxis.Annotations>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    VerticalAlignment

    Gets or sets the value that indicates the vertical alignment of annotation.

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

    The default is Center.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Annotations>
                    <gauge:GaugeAnnotation VerticalAlignment="Start" >
                        <gauge:GaugeAnnotation.Content>
                            <Label Text="Syncfusion"
                                           TextColor="Black" />
                        </gauge:GaugeAnnotation.Content>
                    </gauge:GaugeAnnotation>
                </gauge:RadialAxis.Annotations>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved