menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RangeAxisBase - API Reference

    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.IsVisibleProperty
    ChartAxis.AxisLineOffsetProperty
    ChartAxis.LabelRotationProperty
    ChartAxis.LabelStyleProperty
    ChartAxis.AxisLineStyleProperty
    ChartAxis.CrossesAtProperty
    ChartAxis.RenderNextToCrossingValueProperty
    ChartAxis.CrossAxisNameProperty
    ChartAxis.TitleProperty
    ChartAxis.IsInversedProperty
    ChartAxis.EdgeLabelsDrawingModeProperty
    ChartAxis.MajorGridLineStyleProperty
    ChartAxis.MajorTickStyleProperty
    ChartAxis.ZoomPositionProperty
    ChartAxis.ZoomFactorProperty
    ChartAxis.ShowMajorGridLinesProperty
    ChartAxis.NameProperty
    ChartAxis.PlotOffsetStartProperty
    ChartAxis.PlotOffsetEndProperty
    ChartAxis.EnableAutoIntervalOnZoomingProperty
    ChartAxis.ShowTrackballLabelProperty
    ChartAxis.TrackballLabelStyleProperty
    ChartAxis.AutoScrollingModeProperty
    ChartAxis.AutoScrollingDeltaProperty
    ChartAxis.LabelExtentProperty
    ChartAxis.ValueToPoint(Double)
    ChartAxis.PointToValue(Double, Double)
    ChartAxis.GetActualDesiredIntervalsCount(Size)
    ChartAxis.CalculateNiceInterval(DoubleRange, Size)
    ChartAxis.CalculateActualInterval(DoubleRange, Size)
    ChartAxis.ApplyRangePadding(DoubleRange, Double)
    ChartAxis.OnLabelCreated(ChartAxisLabel)
    ChartAxis.CalculateVisibleRange(DoubleRange, Size)
    ChartAxis.CalculateActualRange()
    ChartAxis.CalculateVisibleInterval(DoubleRange, Size)
    ChartAxis.ComputeDesiredSize(Size)
    ChartAxis.DrawAxis(ICanvas, Rect)
    ChartAxis.DrawMajorTick(ICanvas, Double, PointF, PointF)
    ChartAxis.DrawMinorTick(ICanvas, Double, PointF, PointF)
    ChartAxis.DrawAxisLine(ICanvas, Single, Single, Single, Single)
    ChartAxis.DrawGridLine(ICanvas, Double, Single, Single, Single, Single)
    ChartAxis.OnParentSet()
    ChartAxis.IsVisible
    ChartAxis.PlotOffsetStart
    ChartAxis.PlotOffsetEnd
    ChartAxis.AxisLineOffset
    ChartAxis.LabelRotation
    ChartAxis.LabelStyle
    ChartAxis.AxisLineStyle
    ChartAxis.CrossesAt
    ChartAxis.RenderNextToCrossingValue
    ChartAxis.CrossAxisName
    ChartAxis.Title
    ChartAxis.IsInversed
    ChartAxis.EdgeLabelsDrawingMode
    ChartAxis.MajorGridLineStyle
    ChartAxis.MajorTickStyle
    ChartAxis.ZoomPosition
    ChartAxis.ZoomFactor
    ChartAxis.ShowMajorGridLines
    ChartAxis.EnableAutoIntervalOnZooming
    ChartAxis.ShowTrackballLabel
    ChartAxis.TrackballLabelStyle
    ChartAxis.AutoScrollingDelta
    ChartAxis.AutoScrollingMode
    ChartAxis.Name
    ChartAxis.LabelExtent
    ChartAxis.LabelCreated
    ChartAxis.ActualRangeChanged
    Namespace: Syncfusion.Maui.Charts
    Assembly: Syncfusion.Maui.Charts.dll
    Syntax
    public abstract class RangeAxisBase : ChartAxis

    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 Description
    Microsoft.Maui.Controls.BindableProperty

    MinorGridLineStyleProperty

    Identifies the MinorGridLineStyle bindable property.

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

    MinorTicksPerIntervalProperty

    Identifies the MinorTicksPerInterval bindable property.

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

    MinorTickStyleProperty

    Identifies the MinorTickStyle bindable property.

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

    ShowMinorGridLinesProperty

    Identifies the ShowMinorGridLines bindable property.

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

    Properties

    EdgeLabelsVisibilityMode

    Gets or sets the edge labels visibility mode for hiding the edge labels on zooming.

    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.

    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.

    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);

    Methods

    OnBindingContextChanged()

    Declaration
    protected override void OnBindingContextChanged()
    Overrides
    ChartAxis.OnBindingContextChanged()
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved