Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SFAxis

    Show / Hide Table of Contents

    Class SFAxis

    Serves as a base class for all types of axis.

    Inheritance
    System.Object
    SFAxis
    SFCategoryAxis
    SFDateTimeCategoryAxis
    SFRangeAxisBase
    Namespace: Syncfusion.MacOS.Charts.SfChart
    Assembly: Syncfusion.SfChart.XForms.macOS.dll
    Syntax
    public abstract class SFAxis : Object

    Constructors

    SFAxis()

    Declaration
    public SFAxis()

    Properties

    AutoScrollingDelta

    Gets or sets the value that determines the range of value to be visible during auto scrolling.

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

    AutoScrollingMode

    Gets or sets the mode to determine whether the axis should be auto scrolled at start or end position by using ChartAutoScrollingMode enum type.

    Declaration
    public ChartAutoScrollingMode AutoScrollingMode { get; set; }
    Property Value
    Type Description
    ChartAutoScrollingMode

    AxisLineOffset

    Gets or sets offset value for the axis line.

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

    AxisLineStyle

    Gets the options for customizing the axis line.

    Declaration
    public SFAxisLineStyle AxisLineStyle { get; }
    Property Value
    Type Description
    SFAxisLineStyle

    CrossesAt

    Gets or sets date time or double that represents crossing value to axis.

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

    CrossingAxisName

    Gets or sets the string value that represents name of the crossing axis.

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

    EdgeLabelsDrawingMode

    Gets or sets a drawing mode of the axis labels for better user experience.

    Declaration
    public SFChartAxisEdgeLabelsDrawingMode EdgeLabelsDrawingMode { get; set; }
    Property Value
    Type Description
    SFChartAxisEdgeLabelsDrawingMode

    EnableAutoIntervalOnZooming

    Gets or sets a value indicating whether to calculate the axis intervals on zooming.

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

    Interval

    Gets or sets the interval value that represents the number of division required in the chart axis.

    Declaration
    public NSObject Interval { get; set; }
    Property Value
    Type Description
    Foundation.NSObject

    IsInversed

    Gets or sets a value indicating whether the axis visible range is inversed.

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

    IsVertical

    Gets or sets a value indicating whether the axis should be placed in X or Y axis.

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

    LabelExtent

    Gets or sets the value that determines the distance between the axis label and axis title.

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

    LabelRotationAngle

    Gets or sets the rotation angle of the axis labels.

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

    LabelsIntersectAction

    Gets or sets an action to be taken when two labels intersect in bounds.

    Declaration
    public SFChartAxisLabelsIntersectAction LabelsIntersectAction { get; set; }
    Property Value
    Type Description
    SFChartAxisLabelsIntersectAction

    LabelStyle

    Gets the options for customizing the axis labels.

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

    MajorGridLineStyle

    Gets the options for customizing the major gridlines.

    Declaration
    public SFAxisGridLineStyle MajorGridLineStyle { get; }
    Property Value
    Type Description
    SFAxisGridLineStyle

    MajorTickStyle

    Gets the options for customizing the major tick lines.

    Declaration
    public SFAxisTickStyle MajorTickStyle { get; }
    Property Value
    Type Description
    SFAxisTickStyle

    MaximumLabels

    Gets or sets the value that determines the number of labels to be displayed per 100 pixels.

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

    Name

    Gets or sets the unique name of the axis, which will be used to identify the segment axis of the strip line.

    Declaration
    public NSString Name { get; set; }
    Property Value
    Type Description
    Foundation.NSString

    OpposedPosition

    Gets or sets a value indicating whether to draw axis at the opposite side of axis in the chart.

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

    PlotOffset

    Gets or sets the value from which the axis elements like label, tick lines will be drawn inside axis bounds.

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

    PlotOffsetEnd

    Gets or sets the value that used to offset the rendering of the axis at end position.

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

    The default value is 0.

    Remarks

    PlotOffsetEnd applies padding at end of plot area where the axis and its elements are rendered in chart with padding at end. PlotOffsetEnd is not applicable for polar and radar chart series. If the values set to both PlotOffset and PlotOffsetEnd, then PlotOffset takes highest precedence.

    See Also
    PlotOffset
    PlotOffsetStart

    PlotOffsetStart

    Gets or sets the value that used to offset the rendering of the axis at start position.

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

    The default value is 0.

    Remarks

    PlotOffsetStart applies padding at start of plot area where the axis and its elements are rendered in chart with padding at start. PlotOffsetStart is not applicable for polar and radar chart series. If the values set to both PlotOffset and PlotOffsetStart, then PlotOffset takes highest precedence.

    See Also
    PlotOffset
    PlotOffsetEnd

    PolarAngle

    Gets or sets the angle as a start position for polar or radar series by using ChartPolarAngle enum type.

    Declaration
    public ChartPolarAngle PolarAngle { get; set; }
    Property Value
    Type Description
    ChartPolarAngle

    RangeStyles

    Gets or sets the collection of the ChartAxisRangeStyle to customize the axis GridLine, TickLine and LabelStyle for specific range.

    Declaration
    public ChartAxisRangeStyleCollection RangeStyles { get; set; }
    Property Value
    Type Description
    ChartAxisRangeStyleCollection

    This property takes the ChartAxisRangeStyleCollection as its value.

    RenderNextToCrossingValue

    Gets or sets a value indicating whether the crossing axis should be placed at crossing position or not.

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

    ShowMajorGridLines

    Gets or sets a value indicating whether to show the major gridlines for the axis.

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

    TickPosition

    Gets or sets the position of the axis tick lines.

    Declaration
    public SFChartAxisElementPosition TickPosition { get; set; }
    Property Value
    Type Description
    SFChartAxisElementPosition

    Title

    Gets the title for the axis.

    Declaration
    public SFAxisTitleStyle Title { get; }
    Property Value
    Type Description
    SFAxisTitleStyle

    TrackballLabelStyle

    Gets the customized style for the axis trackball label.

    Declaration
    public SFChartTrackballAxisLabelStyle TrackballLabelStyle { get; }
    Property Value
    Type Description
    SFChartTrackballAxisLabelStyle

    Visible

    Gets or sets a value indicating whether the axis is visible in the chart.

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

    VisibleLabels

    Gets the visible labels.

    Declaration
    public ObservableCollection<SFAxis.ChartAxisLabel> VisibleLabels { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<SFAxis.ChartAxisLabel>

    VisibleRange

    Gets the visible range.

    Declaration
    public DoubleRange VisibleRange { get; }
    Property Value
    Type Description
    DoubleRange

    ZoomFactor

    Gets or sets the value, between 0 to 1, that indicates the zoom level of the axis.

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

    ZoomPosition

    Gets or sets the value, between 0 to 1, that indicates the start position in the actual range of the axis.

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

    Methods

    ApplyRangePadding(DoubleRange, Double)

    Declaration
    protected virtual DoubleRange ApplyRangePadding(DoubleRange range, double interval)
    Parameters
    Type Name Description
    DoubleRange range
    System.Double interval
    Returns
    Type Description
    DoubleRange

    CalculateActualInterval(DoubleRange, SizeF)

    Declaration
    protected virtual double CalculateActualInterval(DoubleRange range, SizeF availableSize)
    Parameters
    Type Name Description
    DoubleRange range
    System.Drawing.SizeF availableSize
    Returns
    Type Description
    System.Double

    CalculateActualRange()

    Declaration
    protected virtual DoubleRange CalculateActualRange()
    Returns
    Type Description
    DoubleRange

    CalculateNiceInterval(DoubleRange, SizeF)

    Declaration
    protected virtual double CalculateNiceInterval(DoubleRange actualRange, SizeF availableSize)
    Parameters
    Type Name Description
    DoubleRange actualRange
    System.Drawing.SizeF availableSize
    Returns
    Type Description
    System.Double

    CalculateVisibleRange(SizeF)

    Declaration
    protected virtual void CalculateVisibleRange(SizeF availableSize)
    Parameters
    Type Name Description
    System.Drawing.SizeF availableSize

    CalculateVisibleRangeWithSize(CGSize)

    Declaration
    protected void CalculateVisibleRangeWithSize(CGSize availableSize)
    Parameters
    Type Name Description
    CoreGraphics.CGSize availableSize

    CoefficientForValue(Double)

    Declaration
    public double CoefficientForValue(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type Description
    System.Double

    CoefficientToValue(Double)

    Declaration
    public virtual double CoefficientToValue(double coefficient)
    Parameters
    Type Name Description
    System.Double coefficient
    Returns
    Type Description
    System.Double

    DrawGridLinesInContext(CGContext)

    Declaration
    public virtual void DrawGridLinesInContext(CGContext context)
    Parameters
    Type Name Description
    CoreGraphics.CGContext context

    DrawInContext(CGContext)

    Declaration
    public virtual void DrawInContext(CGContext context)
    Parameters
    Type Name Description
    CoreGraphics.CGContext context

    DrawStripLinesInContext(CGContext)

    Declaration
    public virtual void DrawStripLinesInContext(CGContext context)
    Parameters
    Type Name Description
    CoreGraphics.CGContext context

    GenerateVisibleLabels()

    Method implementation for Generate Labels in ChartAxis

    Declaration
    protected virtual void GenerateVisibleLabels()

    GetActualDesiredIntervalsCount(SizeF)

    Declaration
    protected double GetActualDesiredIntervalsCount(SizeF availableSize)
    Parameters
    Type Name Description
    System.Drawing.SizeF availableSize
    Returns
    Type Description
    System.Double

    OnPropertyChanged()

    Declaration
    protected virtual void OnPropertyChanged()

    PointForValue(Double)

    Declaration
    public double PointForValue(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type Description
    System.Double

    ValueForCoefficient(Double)

    Declaration
    public double ValueForCoefficient(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type Description
    System.Double

    ValueForPoint(CGPoint)

    Declaration
    public double ValueForPoint(CGPoint point)
    Parameters
    Type Name Description
    CoreGraphics.CGPoint point
    Returns
    Type Description
    System.Double

    ValueToCoefficient(Double)

    Declaration
    public virtual float ValueToCoefficient(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type Description
    System.Single

    ValueToPoint(Double)

    Declaration
    public float ValueToPoint(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type Description
    System.Single

    ValueToPolarCoefficient(Double)

    Declaration
    public virtual float ValueToPolarCoefficient(double value)
    Parameters
    Type Name Description
    System.Double value
    Returns
    Type Description
    System.Single

    Events

    LabelClicked

    Event is raised, when the axis label is clicked.

    Declaration
    public event EventHandler<SFAxis.ChartAxisLabelClickedEventArgs> LabelClicked
    Event Type
    Type Description
    System.EventHandler<SFAxis.ChartAxisLabelClickedEventArgs>

    LabelCreated

    Event is raised, when the axis label is created.

    Declaration
    public event EventHandler<SFAxis.LabelCreatedEventArgs> LabelCreated
    Event Type
    Type Description
    System.EventHandler<SFAxis.LabelCreatedEventArgs>
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved