menu

MAUI Toolkit

  • User Guide
  • Demos
  • Support
Class RangeAxisBase - MAUI-ToolKit API Reference | Syncfusion

    Show / Hide Table of Contents

    Class RangeAxisBase

    The RangeAxisBase is the base class for all types of range axis.

    Inheritance
    System.Object
    ChartAxis
    RangeAxisBase
    DateTimeAxis
    LogarithmicAxis
    NumericalAxis
    Inherited Members
    ChartAxis.ActualRangeChanged
    ChartAxis.ApplyRangePadding(DoubleRange, Double)
    ChartAxis.AutoScrollingDelta
    ChartAxis.AutoScrollingDeltaProperty
    ChartAxis.AutoScrollingMode
    ChartAxis.AutoScrollingModeProperty
    ChartAxis.AxisLineOffset
    ChartAxis.AxisLineOffsetProperty
    ChartAxis.AxisLineStyle
    ChartAxis.AxisLineStyleProperty
    ChartAxis.CalculateActualInterval(DoubleRange, Size)
    ChartAxis.CalculateActualRange()
    ChartAxis.CalculateNiceInterval(DoubleRange, Size)
    ChartAxis.CalculateVisibleInterval(DoubleRange, Size)
    ChartAxis.CalculateVisibleRange(DoubleRange, Size)
    ChartAxis.ComputeDesiredSize(Size)
    ChartAxis.CrossAxisName
    ChartAxis.CrossAxisNameProperty
    ChartAxis.CrossesAt
    ChartAxis.CrossesAtProperty
    ChartAxis.DrawAxis(ICanvas, Rect)
    ChartAxis.DrawAxisLine(ICanvas, Single, Single, Single, Single)
    ChartAxis.DrawGridLine(ICanvas, Double, Single, Single, Single, Single)
    ChartAxis.DrawMajorTick(ICanvas, Double, PointF, PointF)
    ChartAxis.DrawMinorTick(ICanvas, Double, PointF, PointF)
    ChartAxis.EdgeLabelsDrawingMode
    ChartAxis.EdgeLabelsDrawingModeProperty
    ChartAxis.EnableAutoIntervalOnZooming
    ChartAxis.EnableAutoIntervalOnZoomingProperty
    ChartAxis.GetActualDesiredIntervalsCount(Size)
    ChartAxis.IsInversed
    ChartAxis.IsInversedProperty
    ChartAxis.IsVisible
    ChartAxis.IsVisibleProperty
    ChartAxis.LabelCreated
    ChartAxis.LabelExtent
    ChartAxis.LabelExtentProperty
    ChartAxis.LabelRotation
    ChartAxis.LabelRotationProperty
    ChartAxis.LabelsIntersectAction
    ChartAxis.LabelsIntersectActionProperty
    ChartAxis.LabelsPosition
    ChartAxis.LabelsPositionProperty
    ChartAxis.LabelStyle
    ChartAxis.LabelStyleProperty
    ChartAxis.MajorGridLineStyle
    ChartAxis.MajorGridLineStyleProperty
    ChartAxis.MajorTickStyle
    ChartAxis.MajorTickStyleProperty
    ChartAxis.MaximumLabels
    ChartAxis.MaximumLabelsProperty
    ChartAxis.Name
    ChartAxis.NameProperty
    ChartAxis.OnCreateLabels()
    ChartAxis.OnLabelCreated(ChartAxisLabel)
    ChartAxis.PlotOffsetEnd
    ChartAxis.PlotOffsetEndProperty
    ChartAxis.PlotOffsetStart
    ChartAxis.PlotOffsetStartProperty
    ChartAxis.PointToValue(Double, Double)
    ChartAxis.RenderNextToCrossingValue
    ChartAxis.RenderNextToCrossingValueProperty
    ChartAxis.ShowMajorGridLines
    ChartAxis.ShowMajorGridLinesProperty
    ChartAxis.ShowTrackballLabel
    ChartAxis.ShowTrackballLabelProperty
    ChartAxis.TickPosition
    ChartAxis.TickPositionProperty
    ChartAxis.Title
    ChartAxis.TitleProperty
    ChartAxis.TrackballLabelStyle
    ChartAxis.TrackballLabelStyleProperty
    ChartAxis.TrackballLabelTemplate
    ChartAxis.TrackballLabelTemplateProperty
    ChartAxis.ValueToPoint(Double)
    ChartAxis.VisibleLabels
    ChartAxis.VisibleMaximum
    ChartAxis.VisibleMinimum
    ChartAxis.ZoomFactor
    ChartAxis.ZoomFactorProperty
    ChartAxis.ZoomPosition
    ChartAxis.ZoomPositionProperty
    Namespace: Syncfusion.Maui.Toolkit.Charts
    Assembly: Syncfusion.Maui.Toolkit.dll
    Syntax
    public abstract class RangeAxisBase : ChartAxis, IThemeElement

    Constructors

    RangeAxisBase()

    Initializes a new instance of the RangeAxisBase.

    Declaration
    public RangeAxisBase()

    Fields

    EdgeLabelsVisibilityModeProperty

    Identifies the EdgeLabelsVisibilityMode bindable property.

    Declaration
    public static readonly BindableProperty EdgeLabelsVisibilityModeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    Defines the visibility mode for edge labels on the axis.

    MinorGridLineStyleProperty

    Identifies the MinorGridLineStyle bindable property.

    Declaration
    public static readonly BindableProperty MinorGridLineStyleProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    Defines the style for minor grid lines on the axis.

    MinorTicksPerIntervalProperty

    Identifies the MinorTicksPerInterval bindable property.

    Declaration
    public static readonly BindableProperty MinorTicksPerIntervalProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    Defines the number of minor ticks to display per interval on the axis.

    MinorTickStyleProperty

    Identifies the MinorTickStyle bindable property.

    Declaration
    public static readonly BindableProperty MinorTickStyleProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    Defines the style for minor ticks on the axis.

    ShowMinorGridLinesProperty

    Identifies the ShowMinorGridLines bindable property.

    Declaration
    public static readonly BindableProperty ShowMinorGridLinesProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    Determines whether to display minor grid lines on the axis.

    Properties

    EdgeLabelsVisibilityMode

    Gets or sets the visibility mode of the edge labels for the axis, allowing options to hide the labels when zooming or to keep them visible.

    Declaration
    public EdgeLabelsVisibilityMode EdgeLabelsVisibilityMode { get; set; }
    Property Value
    Type Description
    EdgeLabelsVisibilityMode

    It accepts the EdgeLabelsVisibilityMode values and its default value is Default.

    Examples
    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
        <chart:SfCartesianChart.XAxes>
            <chart:NumericalAxis EdgeLabelsVisibilityMode ="Visible" />
        </chart:SfCartesianChart.XAxes>
    
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    NumericalAxis xAxis = new NumericalAxis()
    {
       EdgeLabelsVisibilityMode = EdgeLabelsVisibilityMode.Visible,
    };
    chart.XAxes.Add(xAxis);

    MinorGridLineStyle

    Gets or sets the ChartLineStyle to customize the appearance of the minor grid lines.

    Declaration
    public ChartLineStyle MinorGridLineStyle { get; set; }
    Property Value
    Type Description
    ChartLineStyle

    It accepts the ChartLineStyle value.

    Remarks

    To customize the minor grid line appearance, you need to create an instance of the ChartLineStyle class and set to the MinorGridLineStyle property.

    Null values are invalid.

    Examples
    • MainWindow.xaml
    • MainWindow.cs
        <chart:SfCartesianChart>
    
             <chart:SfCartesianChart.Resources>
                 <DoubleCollection x:Key="dashArray">
                     <x:Double>3</x:Double>
                     <x:Double>3</x:Double>
                 </DoubleCollection>
             </chart:SfCartesianChart.Resources>
    
              <chart:SfCartesianChart.XAxes>
                  <chart:NumericalAxis ShowMinorGridLines="True">
                      <chart:NumericalAxis.MajorGridLineStyle>
                          <chart:ChartLineStyle StrokeDashArray="{StaticResource dashArray}" Stroke="Black" StrokeWidth="0.8"/>
                      </chart:NumericalAxis.MajorGridLineStyle>
                  </chart:NumericalAxis>
              </chart:SfCartesianChart.XAxes>
    
              <chart:SfCartesianChart.YAxes>
                  <chart:NumericalAxis/>
              </chart:SfCartesianChart.YAxes>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
    
        NumericalAxis xAxis = new NumericalAxis();
        chart.XAxes.Add(xAxis);
    
        DoubleCollection doubleCollection = new DoubleCollection();
        doubleCollection.Add(3);
        doubleCollection.Add(3);
    
        NumericalAxis yAxis = new NumericalAxis();
        ChartLineStyle axisLineStyle = new ChartLineStyle();
        axisLineStyle.Stroke = SolidColorBrush.Black;
        axisLineStyle.StrokeWidth = 0.8;
        axisLineStyle.StrokeDashArray = doubleCollection
        yAxis.MinorGridLineStyle = axisLineStyle;
        chart.YAxes.Add(yAxis);

    MinorTicksPerInterval

    Gets or sets the value that defines the number of minor tick/grid lines to be drawn between the adjacent major tick/grid lines.

    Declaration
    public int MinorTicksPerInterval { get; set; }
    Property Value
    Type Description
    System.Int32

    It accepts the integer values and its default value is 0.

    Examples
    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
            <chart:SfCartesianChart.XAxes>
                <chart:NumericalAxis MinorTicksPerInterval="3"  />
            </chart:SfCartesianChart.XAxes>
    
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    NumericalAxis xAxis = new NumericalAxis();
    xAxis.MinorTicksPerInterval= 3;
    chart.XAxes.Add(xAxis);

    MinorTickStyle

    Gets or sets the ChartAxisTickStyle to customize the appearance of the minor tick lines.

    Declaration
    public ChartAxisTickStyle MinorTickStyle { get; set; }
    Property Value
    Type Description
    ChartAxisTickStyle

    It accepts the ChartAxisTickStyle value.

    Remarks

    To customize the axis minor tick line appearance, you need to create an instance of the ChartAxisTickStyle class and set to the MinorTickStyle property.

    Null values are invalid.

    Examples
    • MainWindow.xaml
    • MainWindow.cs
        <chart:SfCartesianChart>
    
              <chart:SfCartesianChart.XAxes>
                  <chart:NumericalAxis MinorTicksPerInterval="4">
                      <chart:NumericalAxis.MinorTickStyle>
                          <chart:ChartAxisTickStyle Stroke="Red" StrokeWidth="1"/>
                      </chart:NumericalAxis.MinorTickStyle>
                  </chart:NumericalAxis>
              </chart:SfCartesianChart.XAxes>
    
              <chart:SfCartesianChart.YAxes>
                  <chart:NumericalAxis/>
              </chart:SfCartesianChart.YAxes>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
    
        NumericalAxis xAxis = new NumericalAxis();
        xAxis.MinorTicksPerInterval = 4;
        xAxis.MinorTickStyle.StrokeWidth = 1;
        xAxis.MinorTickStyle.Stroke = SolidColorBrush.Red;
        chart.XAxes.Add(xAxis);
    
        NumericalAxis yAxis = new NumericalAxis();
        chart.YAxes.Add(yAxis);

    ShowMinorGridLines

    Gets or sets a value indicating whether the axis minor grid lines can be displayed or not.

    Declaration
    public bool ShowMinorGridLines { get; set; }
    Property Value
    Type Description
    System.Boolean

    It accepts the bool value and its default value is True.

    Examples
    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
        <chart:SfCartesianChart.XAxes>
            <chart:NumericalAxis ShowMinorGridLines = "False" 
                                 MinorTicksPerInterval="2" />
        </chart:SfCartesianChart.XAxes>
    
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    NumericalAxis xAxis = new NumericalAxis()
    {
       ShowMinorGridLines = false,
       MinorTicksPerInterval = 2,
    };
    chart.XAxes.Add(xAxis);
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved