WinUI

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GaugeAxis - WinUI API Reference | Syncfusion RadialAxis. It contains common logic of ranges, pointers, labels, and ticks that help to visualize the data. ">

    Show / Hide Table of Contents

    Class GaugeAxis

    Base class of RadialAxis. It contains common logic of ranges, pointers, labels, and ticks that help to visualize the data.

    Inheritance
    System.Object
    GaugeAxis
    RadialAxis
    Namespace: Syncfusion.UI.Xaml.Gauges
    Assembly: Syncfusion.Gauge.WinUI.dll
    Syntax
    public abstract class GaugeAxis : Control

    Constructors

    GaugeAxis()

    Initializes a new instance of the GaugeAxis class.

    Declaration
    public GaugeAxis()

    Fields

    AnnotationsProperty

    Dependency registration for Annotations

    Declaration
    public static readonly DependencyProperty AnnotationsProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    AxisLineFillProperty

    The dependency registration for AxisLineFill

    Declaration
    public static readonly DependencyProperty AxisLineFillProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    AxisLineWidthProperty

    The dependency registration for AxisLineWidth

    Declaration
    public static readonly DependencyProperty AxisLineWidthProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    AxisLineWidthUnitProperty

    The dependency registration for AxisLineWidthUnit

    Declaration
    public static readonly DependencyProperty AxisLineWidthUnitProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    GradientStopsProperty

    Dependency registration for GradientStops

    Declaration
    public static readonly DependencyProperty GradientStopsProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    IntervalProperty

    The dependency registration for Interval

    Declaration
    public static readonly DependencyProperty IntervalProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    IsInversedProperty

    Dependency registration for IsInversed

    Declaration
    public static readonly DependencyProperty IsInversedProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    LabelFormatProperty

    Dependency registration for LabelFormat

    Declaration
    public static readonly DependencyProperty LabelFormatProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    LabelPositionProperty

    Dependency registration for LabelPosition

    Declaration
    public static readonly DependencyProperty LabelPositionProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    LabelTemplateProperty

    Dependency registration for LabelTemplate

    Declaration
    public static readonly DependencyProperty LabelTemplateProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    MajorTickLengthProperty

    The dependency registration for MajorTickLength

    Declaration
    public static readonly DependencyProperty MajorTickLengthProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    MajorTickStyleProperty

    The dependency registration for MajorTickStyle

    Declaration
    public static readonly DependencyProperty MajorTickStyleProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    MaximumLabelsCountProperty

    The dependency registration for MaximumLabelsCount

    Declaration
    public static readonly DependencyProperty MaximumLabelsCountProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    MaximumProperty

    The dependency registration for Maximum

    Declaration
    public static readonly DependencyProperty MaximumProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    MinimumProperty

    The dependency registration for Minimum

    Declaration
    public static readonly DependencyProperty MinimumProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    MinorTickLengthProperty

    The dependency registration for MinorTickLength

    Declaration
    public static readonly DependencyProperty MinorTickLengthProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    MinorTicksPerIntervalProperty

    The dependency registration for MinorTicksPerInterval

    Declaration
    public static readonly DependencyProperty MinorTicksPerIntervalProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    MinorTickStyleProperty

    The dependency registration for MinorTickStyle

    Declaration
    public static readonly DependencyProperty MinorTickStyleProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    PointersProperty

    Dependency registration for Pointers

    Declaration
    public static readonly DependencyProperty PointersProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    RangesProperty

    Dependency registration for Ranges

    Declaration
    public static readonly DependencyProperty RangesProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    ShowAxisLineProperty

    Dependency registration for ShowAxisLine

    Declaration
    public static readonly DependencyProperty ShowAxisLineProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    ShowLabelsProperty

    Dependency registration for ShowLabels

    Declaration
    public static readonly DependencyProperty ShowLabelsProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    ShowTicksProperty

    Dependency registration for ShowTicks

    Declaration
    public static readonly DependencyProperty ShowTicksProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    TickLengthUnitProperty

    The dependency registration for TickLengthUnit

    Declaration
    public static readonly DependencyProperty TickLengthUnitProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    TickPositionProperty

    Dependency registration for TickPosition

    Declaration
    public static readonly DependencyProperty TickPositionProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    UseRangeColorForAxisProperty

    Dependency registration for UseRangeColorForAxis

    Declaration
    public static readonly DependencyProperty UseRangeColorForAxisProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    Properties

    Annotations

    Gets or sets a collection of GaugeAnnotation to the axis.

    Declaration
    public ObservableCollection<GaugeAnnotation> Annotations { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<GaugeAnnotation>
    Examples

    The below examples shows, how to add a collection of annotation to the radial axis and customize each annotation by adding it to the annotation collection.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Annotations>
                    <gauge:GaugeAnnotation DirectionUnit="Angle"
                                           DirectionValue="90"
                                           PositionFactor="0.6">
                            <gauge:GaugeAnnotation.Content>
                                <Grid Background = "Pink" >
                                    <TextBlock Text="GaugeAnnotation"
                                               Foreground="Black" />
                                </Grid>
                            </gauge:GaugeAnnotation.Content>
                    </gauge:GaugeAnnotation>
                </gauge:RadialAxis.Annotations>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    AxisLineFill

    Gets or sets the AxisLineFill of axis.

    Declaration
    public Brush AxisLineFill { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Media.Brush
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis AxisLineFill="Gray" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    AxisLineWidth

    Gets or sets a value to customize the axis line width.

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

    If AxisLineWidthUnit is Factor, value must be given from 0 to 1. Here width is calculated by AxisLineWidth * axis radius value. Example: AxisLineWidth value is 0.2 and axis outer radius is 100, thickness is 20(0.2 * 100) logical pixels.If AxisLineWidthUnit is Pixel, the defined value for axis line AxisLineWidth is set.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis AxisLineWidth="10" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    AxisLineWidthUnit

    Gets or sets the value that indicates to calculate the axis line width either in logical pixel or factor.

    Declaration
    public SizeUnit AxisLineWidthUnit { get; set; }
    Property Value
    Type Description
    SizeUnit
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis AxisLineWidthUnit="Factor" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    GradientStops

    Gets or sets a collection of GaugeGradientStop to fill the gradient brush to the axis line.

    Declaration
    public ObservableCollection<GaugeGradientStop> GradientStops { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<GaugeGradientStop>
    Examples

    The below examples shows, how to add a collection of gradient stop to the radial axis.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis Minimum="0"
                              Maximum="100">
                <gauge:RadialAxis.GradientStops>
                    <gauge:GaugeGradientStop Value="0"
                                             Color="Green" />
                    <gauge:GaugeGradientStop Value="50"
                                             Color="Yellow" />
                    <gauge:GaugeGradientStop Value="100"
                                             Color="Red" />
                </gauge:RadialAxis.GradientStops>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Interval

    Gets or sets the interval value of the axis. Using this, the axis labels can be displayed after a certain interval value.

    Declaration
    public double Interval { get; set; }
    Property Value
    Type Description
    System.Double
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis Interval="10" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    IsInversed

    Gets or sets a value indicating whether inverts the axis from right to left.

    Declaration
    public bool IsInversed { get; set; }
    Property Value
    Type Description
    System.Boolean
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis IsInversed="True" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    LabelFormat

    Gets or sets a value to formats the axis labels with globalized string formats.

    Declaration
    public string LabelFormat { get; set; }
    Property Value
    Type Description
    System.String
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis LabelFormat="c" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    LabelPosition

    Gets or sets the value that indicates the position of the axis labels inside or outside the axis line.

    Declaration
    public LabelsPosition LabelPosition { get; set; }
    Property Value
    Type Description
    LabelsPosition
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis LabelPosition="Outside" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    LabelTemplate

    Gets or sets the data template to customizes the axis label.

    Declaration
    public DataTemplate LabelTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.DataTemplate
    Remarks

    Its DataContext is AxisLabelData.

    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.LabelTemplate>
                    <DataTemplate>
                        <Grid Background="LightBlue"
                              BorderThickness="1"
                              BorderBrush="Red">
                            <TextBlock Text = "{Binding Text}"
                                       Foreground="Red"
                                       FontSize="30" />
                        </Grid>
                    </DataTemplate>
                </gauge:RadialAxis.LabelTemplate>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    MajorTickLength

    Gets or sets the value to customize the major tick line size.

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

    If TickLengthUnit is Factor, value must be given from 0 to 1. Here thickness is calculated by MajorTickLength * axis radius value. Example: MajorTickLength value is 0.2 and axis radius is 100, thickness is 20(0.2 * 100) logical pixels.If TickLengthUnit is Pixel, the defined value for major tick length is set.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis MajorTickLength="15" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    MajorTickStyle

    Gets or sets the style to customizes the major tick line.

    Declaration
    public Style MajorTickStyle { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Style
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.MajorTickStyle>
                    <Style TargetType = "Line" >
                        < Setter Property="Stroke"
                                Value="#999999"></Setter>
                        <Setter Property = "StrokeThickness"
                                Value="1.5"></Setter>
                    </Style>
                </gauge:RadialAxis.MajorTickStyle>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Maximum

    Gets or sets the maximum value of the axis. The axis ends at this value.

    Declaration
    public double Maximum { get; set; }
    Property Value
    Type Description
    System.Double
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis Maximum="150" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    MaximumLabelsCount

    Gets or sets the maximum number of labels to be displayed in an axis in 100 logical pixels.

    Declaration
    public int MaximumLabelsCount { get; set; }
    Property Value
    Type Description
    System.Int32
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis MaximumLabelsCount="3" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Minimum

    Gets or sets the minimum value of the axis. The axis starts from this value.

    Declaration
    public double Minimum { get; set; }
    Property Value
    Type Description
    System.Double
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis Minimum="10" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    MinorTickLength

    Gets or sets the value to customize the minor tick line size.

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

    If TickLengthUnit is Factor, value must be given from 0 to 1. Here thickness is calculated by MinorTickLength * axis radius value. Example: MinorTickLength value is 0.2 and axis radius is 100, thickness is 20(0.2 * 100) logical pixels.If TickLengthUnit is Pixel, the defined value for minor tick length is set.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis MinorTickLength="10" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    MinorTicksPerInterval

    Gets or sets the interval of the minor ticks.

    Declaration
    public double MinorTicksPerInterval { get; set; }
    Property Value
    Type Description
    System.Double
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis MinorTicksPerInterval="5" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    MinorTickStyle

    Gets or sets the style to customizes the minor tick line.

    Declaration
    public Style MinorTickStyle { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Style
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.MinorTickStyle>
                    <Style TargetType = "Line" >
                        < Setter Property="Stroke"
                                Value="#999999"></Setter>
                        <Setter Property = "StrokeThickness"
                                Value="1"></Setter>
                    </Style>
                </gauge:RadialAxis.MinorTickStyle>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Pointers

    Gets or sets a collection of GaugePointer to the axis.

    Declaration
    public ObservableCollection<GaugePointer> Pointers { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<GaugePointer>
    Examples

    The below examples shows, how to add a collection of gauge pointer to the radial axis and customize each pointer by adding it to the pointers collection.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Pointers>
                    <gauge:MarkerPointer Value="50" />
                    <gauge:NeedlePointer Value="60" />
                    <gauge:RangePointer Value="70"/>
                </gauge:RadialAxis.Pointers>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Ranges

    Gets or sets a collection of GaugeRange to the axis.

    Declaration
    public ObservableCollection<GaugeRange> Ranges { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<GaugeRange>
    Examples

    The below examples shows, how to add a collection of gauge range to the radial axis and customize each range by adding it to the ranges collection.

    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis>
                <gauge:RadialAxis.Ranges>
                    <gauge:GaugeRange StartValue="0" EndValue="35" Background="Green" />
                    <gauge:GaugeRange StartValue="35" EndValue="70" Background="Orange" />
                    <gauge:GaugeRange StartValue="70" EndValue="100" Background="Red" />
                </gauge:RadialAxis.Ranges>
            </gauge:RadialAxis>
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    ShowAxisLine

    Gets or sets a value indicating whether to shows or hides the axis line.

    Declaration
    public bool ShowAxisLine { get; set; }
    Property Value
    Type Description
    System.Boolean
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis ShowAxisLine="False" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    ShowLabels

    Gets or sets a value indicating whether to shows or hides the axis labels.

    Declaration
    public bool ShowLabels { get; set; }
    Property Value
    Type Description
    System.Boolean
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis ShowLabels="False" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    ShowTicks

    Gets or sets a value indicating whether to shows or hides the axis tick lines.

    Declaration
    public bool ShowTicks { get; set; }
    Property Value
    Type Description
    System.Boolean
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis ShowTicks="False" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    TickLengthUnit

    Gets or sets the value that indicates to calculate the tick length either in logical pixel or factor.

    Declaration
    public SizeUnit TickLengthUnit { get; set; }
    Property Value
    Type Description
    SizeUnit
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis TickLengthUnit="Factor" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    TickPosition

    Gets or sets the value that indicates the position of the ticks inside, center, or outside the axis line.

    Declaration
    public TickElementsPosition TickPosition { get; set; }
    Property Value
    Type Description
    TickElementsPosition
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis TickPosition="Outside" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    UseRangeColorForAxis

    Gets or sets a value indicating whether to use the range color for axis elements such as labels and ticks.

    Declaration
    public bool UseRangeColorForAxis { get; set; }
    Property Value
    Type Description
    System.Boolean
    Examples
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis UseRangeColorForAxis="True" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>

    Events

    LabelPrepared

    Called when an axis label is created

    Declaration
    public event EventHandler<LabelPreparedEventArgs> LabelPrepared
    Event Type
    Type Description
    System.EventHandler<LabelPreparedEventArgs>
    Examples
    • XAML
    • C#
    <gauge:SfRadialGauge>
        <gauge:SfRadialGauge.Axes>
            <gauge:RadialAxis LabelPrepared="RadialAxis_LabelPrepared" />
        </gauge:SfRadialGauge.Axes>
    </gauge:SfRadialGauge>
    private void RadialAxis_LabelPrepared(object sender, LabelPreparedEventArgs e)
    {
        e.LabelText += "%";
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved